mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Remove MIR unsafe check
This also remove safety information from MIR.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
//@ only-x86_64
|
||||
//@ run-pass
|
||||
//@ needs-asm-support
|
||||
//@ revisions: mirunsafeck thirunsafeck
|
||||
//@ [thirunsafeck]compile-flags: -Z thir-unsafeck
|
||||
|
||||
#![deny(unreachable_code)]
|
||||
#![feature(asm_goto)]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
warning: unreachable statement
|
||||
--> $DIR/goto.rs:99:9
|
||||
--> $DIR/goto.rs:97:9
|
||||
|
|
||||
LL | / asm!(
|
||||
LL | | "jmp {}",
|
||||
@@ -13,7 +13,7 @@ LL | unreachable!();
|
||||
| ^^^^^^^^^^^^^^ unreachable statement
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/goto.rs:89:8
|
||||
--> $DIR/goto.rs:87:8
|
||||
|
|
||||
LL | #[warn(unreachable_code)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
@@ -1,23 +0,0 @@
|
||||
warning: unreachable statement
|
||||
--> $DIR/goto.rs:99:9
|
||||
|
|
||||
LL | / asm!(
|
||||
LL | | "jmp {}",
|
||||
LL | | label {
|
||||
LL | | return;
|
||||
LL | | },
|
||||
LL | | options(noreturn)
|
||||
LL | | );
|
||||
| |_________- any code following this expression is unreachable
|
||||
LL | unreachable!();
|
||||
| ^^^^^^^^^^^^^^ unreachable statement
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/goto.rs:89:8
|
||||
|
|
||||
LL | #[warn(unreachable_code)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: this warning originates in the macro `unreachable` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
||||
Reference in New Issue
Block a user