Skip to content

Commit

Permalink
Fix feature gate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed May 18, 2020
1 parent 6ba9696 commit ac1fb93
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/test/ui/feature-gates/feature-gate-asm.rs
Expand Up @@ -2,7 +2,9 @@

fn main() {
unsafe {
asm!(""); //~ ERROR inline assembly is not stable enough
llvm_asm!(""); //~ ERROR inline assembly is not stable enough
asm!("");
//~^ ERROR inline assembly is not stable enough
llvm_asm!("");
//~^ ERROR LLVM-style inline assembly will never be stabilized
}
}
6 changes: 3 additions & 3 deletions src/test/ui/feature-gates/feature-gate-asm.stderr
Expand Up @@ -4,11 +4,11 @@ error[E0658]: use of unstable library feature 'asm': inline assembly is not stab
LL | asm!("");
| ^^^
|
= note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
= note: see issue #72016 <https://github.com/rust-lang/rust/issues/72016> for more information
= help: add `#![feature(asm)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'llvm_asm': inline assembly is not stable enough for use and is subject to change
--> $DIR/feature-gate-asm.rs:6:9
error[E0658]: use of unstable library feature 'llvm_asm': LLVM-style inline assembly will never be stabilized, prefer using asm! instead
--> $DIR/feature-gate-asm.rs:7:9
|
LL | llvm_asm!("");
| ^^^^^^^^
Expand Down
6 changes: 4 additions & 2 deletions src/test/ui/feature-gates/feature-gate-asm2.rs
Expand Up @@ -2,7 +2,9 @@

fn main() {
unsafe {
println!("{:?}", asm!("")); //~ ERROR inline assembly is not stable
println!("{:?}", llvm_asm!("")); //~ ERROR inline assembly is not stable
println!("{:?}", asm!(""));
//~^ ERROR inline assembly is not stable enough
println!("{:?}", llvm_asm!(""));
//~^ ERROR LLVM-style inline assembly will never be stabilized
}
}
6 changes: 3 additions & 3 deletions src/test/ui/feature-gates/feature-gate-asm2.stderr
Expand Up @@ -4,11 +4,11 @@ error[E0658]: use of unstable library feature 'asm': inline assembly is not stab
LL | println!("{:?}", asm!(""));
| ^^^
|
= note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
= note: see issue #72016 <https://github.com/rust-lang/rust/issues/72016> for more information
= help: add `#![feature(asm)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'llvm_asm': inline assembly is not stable enough for use and is subject to change
--> $DIR/feature-gate-asm2.rs:6:26
error[E0658]: use of unstable library feature 'llvm_asm': LLVM-style inline assembly will never be stabilized, prefer using asm! instead
--> $DIR/feature-gate-asm2.rs:7:26
|
LL | println!("{:?}", llvm_asm!(""));
| ^^^^^^^^
Expand Down

0 comments on commit ac1fb93

Please sign in to comment.