Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/test/ui/consts/miri_unleashed/inline_asm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// compile-flags: -Zunleash-the-miri-inside-of-you
// only-x86_64
#![feature(llvm_asm)]
#![allow(const_err)]

fn main() {}

// Make sure we catch executing bad drop functions.
// The actual error is tested by the error-pattern above.
static TEST_BAD: () = {
unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
//~^ ERROR could not evaluate static initializer
//~| NOTE in this expansion of llvm_asm!
//~| NOTE inline assembly is not supported
};
11 changes: 11 additions & 0 deletions src/test/ui/consts/miri_unleashed/inline_asm.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error[E0080]: could not evaluate static initializer
--> $DIR/inline_asm.rs:11:14
|
LL | unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ inline assembly is not supported
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.