Bless new miri_unleashed test

This commit is contained in:
Dylan MacKenzie 2020-04-19 17:53:17 -07:00
parent e5b58b089e
commit 79543397d7
2 changed files with 13 additions and 2 deletions

View File

@ -6,7 +6,7 @@
fn main() {}
// Make sure we catch executing inline assembly.
static TEST_BAD: () = {
static TEST_BAD: () = { //~ WARN: skipping const checks
unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
//~^ ERROR could not evaluate static initializer
//~| NOTE in this expansion of llvm_asm!

View File

@ -1,3 +1,14 @@
warning: skipping const checks
--> $DIR/inline_asm.rs:9:1
|
LL | / static TEST_BAD: () = {
LL | | unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
LL | |
LL | |
LL | |
LL | | };
| |__^
error[E0080]: could not evaluate static initializer
--> $DIR/inline_asm.rs:10:14
|
@ -6,6 +17,6 @@ LL | unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0080`.