diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2021-07-29 19:45:13 +0200 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2021-08-15 13:27:13 +0100 |
| commit | 632a400a3652beea592af91fff6b39140fe626d9 (patch) | |
| tree | dd37c44d87e624ee7499ed7045614163cd90cafd /src/test/ui/asm | |
| parent | 6fd4f3463f54a7b06189dcc783d5e14593ff7e15 (diff) | |
| download | rust-632a400a3652beea592af91fff6b39140fe626d9.tar.gz rust-632a400a3652beea592af91fff6b39140fe626d9.zip | |
Fix ui tests for llvm_asm! deprecation
Diffstat (limited to 'src/test/ui/asm')
| -rw-r--r-- | src/test/ui/asm/naked-functions.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/asm/naked-functions.stderr | 66 | ||||
| -rw-r--r-- | src/test/ui/asm/rustfix-asm.fixed | 1 | ||||
| -rw-r--r-- | src/test/ui/asm/rustfix-asm.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/asm/rustfix-asm.stderr | 4 |
5 files changed, 38 insertions, 35 deletions
diff --git a/src/test/ui/asm/naked-functions.rs b/src/test/ui/asm/naked-functions.rs index fbf187040f9..72918a14117 100644 --- a/src/test/ui/asm/naked-functions.rs +++ b/src/test/ui/asm/naked-functions.rs @@ -4,6 +4,7 @@ #![feature(naked_functions)] #![feature(or_patterns)] #![crate_type = "lib"] +#![allow(deprecated)] // llvm_asm! #[repr(C)] pub struct P { x: u8, y: u16 } diff --git a/src/test/ui/asm/naked-functions.stderr b/src/test/ui/asm/naked-functions.stderr index 16d3472c28a..3b54757cfe8 100644 --- a/src/test/ui/asm/naked-functions.stderr +++ b/src/test/ui/asm/naked-functions.stderr @@ -1,35 +1,35 @@ error: asm with the `pure` option must have at least one output - --> $DIR/naked-functions.rs:126:14 + --> $DIR/naked-functions.rs:127:14 | LL | asm!("", options(readonly, nostack), options(pure)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ error: patterns not allowed in naked function parameters - --> $DIR/naked-functions.rs:13:5 + --> $DIR/naked-functions.rs:14:5 | LL | mut a: u32, | ^^^^^ error: patterns not allowed in naked function parameters - --> $DIR/naked-functions.rs:15:5 + --> $DIR/naked-functions.rs:16:5 | LL | &b: &i32, | ^^ error: patterns not allowed in naked function parameters - --> $DIR/naked-functions.rs:17:6 + --> $DIR/naked-functions.rs:18:6 | LL | (None | Some(_)): Option<std::ptr::NonNull<u8>>, | ^^^^^^^^^^^^^^ error: patterns not allowed in naked function parameters - --> $DIR/naked-functions.rs:19:5 + --> $DIR/naked-functions.rs:20:5 | LL | P { x, y }: P, | ^^^^^^^^^^ error: referencing function parameters is not allowed in naked functions - --> $DIR/naked-functions.rs:29:5 + --> $DIR/naked-functions.rs:30:5 | LL | a + 1 | ^ @@ -37,7 +37,7 @@ LL | a + 1 = help: follow the calling convention in asm block to use parameters warning: naked functions must contain a single asm block - --> $DIR/naked-functions.rs:26:1 + --> $DIR/naked-functions.rs:27:1 | LL | / pub unsafe extern "C" fn inc(a: u32) -> u32 { LL | | @@ -53,7 +53,7 @@ LL | | } = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> error: referencing function parameters is not allowed in naked functions - --> $DIR/naked-functions.rs:35:31 + --> $DIR/naked-functions.rs:36:31 | LL | asm!("/* {0} */", in(reg) a, options(noreturn)); | ^ @@ -61,7 +61,7 @@ LL | asm!("/* {0} */", in(reg) a, options(noreturn)); = help: follow the calling convention in asm block to use parameters warning: only `const` and `sym` operands are supported in naked functions - --> $DIR/naked-functions.rs:35:23 + --> $DIR/naked-functions.rs:36:23 | LL | asm!("/* {0} */", in(reg) a, options(noreturn)); | ^^^^^^^^^ @@ -70,7 +70,7 @@ LL | asm!("/* {0} */", in(reg) a, options(noreturn)); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions must contain a single asm block - --> $DIR/naked-functions.rs:42:1 + --> $DIR/naked-functions.rs:43:1 | LL | / pub unsafe extern "C" fn inc_closure(a: u32) -> u32 { LL | | @@ -84,7 +84,7 @@ LL | | } = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: only `const` and `sym` operands are supported in naked functions - --> $DIR/naked-functions.rs:62:10 + --> $DIR/naked-functions.rs:63:10 | LL | in(reg) a, | ^^^^^^^^^ @@ -102,7 +102,7 @@ LL | out(reg) e, = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: asm in naked functions must use `noreturn` option - --> $DIR/naked-functions.rs:59:5 + --> $DIR/naked-functions.rs:60:5 | LL | / asm!("/* {0} {1} {2} {3} {4} {5} {6} */", LL | | @@ -117,7 +117,7 @@ LL | | ); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions must contain a single asm block - --> $DIR/naked-functions.rs:49:1 + --> $DIR/naked-functions.rs:50:1 | LL | / pub unsafe extern "C" fn unsupported_operands() { LL | | @@ -141,7 +141,7 @@ LL | | } = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions must contain a single asm block - --> $DIR/naked-functions.rs:75:1 + --> $DIR/naked-functions.rs:76:1 | LL | / pub extern "C" fn missing_assembly() { LL | | @@ -153,7 +153,7 @@ LL | | } = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: asm in naked functions must use `noreturn` option - --> $DIR/naked-functions.rs:84:5 + --> $DIR/naked-functions.rs:85:5 | LL | asm!(""); | ^^^^^^^^^ @@ -162,7 +162,7 @@ LL | asm!(""); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: asm in naked functions must use `noreturn` option - --> $DIR/naked-functions.rs:87:5 + --> $DIR/naked-functions.rs:88:5 | LL | asm!(""); | ^^^^^^^^^ @@ -171,7 +171,7 @@ LL | asm!(""); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: asm in naked functions must use `noreturn` option - --> $DIR/naked-functions.rs:90:5 + --> $DIR/naked-functions.rs:91:5 | LL | asm!(""); | ^^^^^^^^^ @@ -180,7 +180,7 @@ LL | asm!(""); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions must contain a single asm block - --> $DIR/naked-functions.rs:81:1 + --> $DIR/naked-functions.rs:82:1 | LL | / pub extern "C" fn too_many_asm_blocks() { LL | | @@ -202,7 +202,7 @@ LL | | } = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> error: referencing function parameters is not allowed in naked functions - --> $DIR/naked-functions.rs:101:11 + --> $DIR/naked-functions.rs:102:11 | LL | *&y | ^ @@ -210,7 +210,7 @@ LL | *&y = help: follow the calling convention in asm block to use parameters warning: naked functions must contain a single asm block - --> $DIR/naked-functions.rs:98:5 + --> $DIR/naked-functions.rs:99:5 | LL | / pub extern "C" fn inner(y: usize) -> usize { LL | | @@ -225,7 +225,7 @@ LL | | } = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: the LLVM-style inline assembly is unsupported in naked functions - --> $DIR/naked-functions.rs:111:5 + --> $DIR/naked-functions.rs:112:5 | LL | llvm_asm!(""); | ^^^^^^^^^^^^^^ @@ -236,7 +236,7 @@ LL | llvm_asm!(""); = note: this warning originates in the macro `llvm_asm` (in Nightly builds, run with -Z macro-backtrace for more info) warning: naked functions must contain a single asm block - --> $DIR/naked-functions.rs:108:1 + --> $DIR/naked-functions.rs:109:1 | LL | / unsafe extern "C" fn llvm() -> ! { LL | | @@ -252,7 +252,7 @@ LL | | } = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: asm options unsupported in naked functions: `nomem`, `preserves_flags` - --> $DIR/naked-functions.rs:119:5 + --> $DIR/naked-functions.rs:120:5 | LL | asm!("", options(nomem, preserves_flags, noreturn)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -261,7 +261,7 @@ LL | asm!("", options(nomem, preserves_flags, noreturn)); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: asm options unsupported in naked functions: `nostack`, `pure`, `readonly` - --> $DIR/naked-functions.rs:126:5 + --> $DIR/naked-functions.rs:127:5 | LL | asm!("", options(readonly, nostack), options(pure)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -270,7 +270,7 @@ LL | asm!("", options(readonly, nostack), options(pure)); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: asm in naked functions must use `noreturn` option - --> $DIR/naked-functions.rs:126:5 + --> $DIR/naked-functions.rs:127:5 | LL | asm!("", options(readonly, nostack), options(pure)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -279,7 +279,7 @@ LL | asm!("", options(readonly, nostack), options(pure)); = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: Rust ABI is unsupported in naked functions - --> $DIR/naked-functions.rs:135:15 + --> $DIR/naked-functions.rs:136:15 | LL | pub unsafe fn default_abi() { | ^^^^^^^^^^^ @@ -287,13 +287,13 @@ LL | pub unsafe fn default_abi() { = note: `#[warn(undefined_naked_function_abi)]` on by default warning: Rust ABI is unsupported in naked functions - --> $DIR/naked-functions.rs:141:29 + --> $DIR/naked-functions.rs:142:29 | LL | pub unsafe extern "Rust" fn rust_abi() { | ^^^^^^^^ warning: naked functions cannot be inlined - --> $DIR/naked-functions.rs:175:1 + --> $DIR/naked-functions.rs:176:1 | LL | #[inline] | ^^^^^^^^^ @@ -302,7 +302,7 @@ LL | #[inline] = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions cannot be inlined - --> $DIR/naked-functions.rs:183:1 + --> $DIR/naked-functions.rs:184:1 | LL | #[inline(always)] | ^^^^^^^^^^^^^^^^^ @@ -311,7 +311,7 @@ LL | #[inline(always)] = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions cannot be inlined - --> $DIR/naked-functions.rs:191:1 + --> $DIR/naked-functions.rs:192:1 | LL | #[inline(never)] | ^^^^^^^^^^^^^^^^ @@ -320,7 +320,7 @@ LL | #[inline(never)] = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions cannot be inlined - --> $DIR/naked-functions.rs:199:1 + --> $DIR/naked-functions.rs:200:1 | LL | #[inline] | ^^^^^^^^^ @@ -329,7 +329,7 @@ LL | #[inline] = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions cannot be inlined - --> $DIR/naked-functions.rs:202:1 + --> $DIR/naked-functions.rs:203:1 | LL | #[inline(always)] | ^^^^^^^^^^^^^^^^^ @@ -338,7 +338,7 @@ LL | #[inline(always)] = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408> warning: naked functions cannot be inlined - --> $DIR/naked-functions.rs:205:1 + --> $DIR/naked-functions.rs:206:1 | LL | #[inline(never)] | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/asm/rustfix-asm.fixed b/src/test/ui/asm/rustfix-asm.fixed index 01d8fd34b68..9251afd3f05 100644 --- a/src/test/ui/asm/rustfix-asm.fixed +++ b/src/test/ui/asm/rustfix-asm.fixed @@ -2,6 +2,7 @@ // only-x86_64 #![feature(asm, llvm_asm)] +#![allow(deprecated)] // llvm_asm! fn main() { unsafe { diff --git a/src/test/ui/asm/rustfix-asm.rs b/src/test/ui/asm/rustfix-asm.rs index e25895b7230..1e3bfd07708 100644 --- a/src/test/ui/asm/rustfix-asm.rs +++ b/src/test/ui/asm/rustfix-asm.rs @@ -2,6 +2,7 @@ // only-x86_64 #![feature(asm, llvm_asm)] +#![allow(deprecated)] // llvm_asm! fn main() { unsafe { diff --git a/src/test/ui/asm/rustfix-asm.stderr b/src/test/ui/asm/rustfix-asm.stderr index 334499c6fd8..14927f3eb20 100644 --- a/src/test/ui/asm/rustfix-asm.stderr +++ b/src/test/ui/asm/rustfix-asm.stderr @@ -1,5 +1,5 @@ error: the legacy LLVM-style asm! syntax is no longer supported - --> $DIR/rustfix-asm.rs:10:9 + --> $DIR/rustfix-asm.rs:11:9 | LL | asm!("" :: "r" (x)); | ----^^^^^^^^^^^^^^^^ @@ -10,7 +10,7 @@ LL | asm!("" :: "r" (x)); = note: alternatively, switch to llvm_asm! to keep your code working as it is error: the legacy LLVM-style asm! syntax is no longer supported - --> $DIR/rustfix-asm.rs:12:9 + --> $DIR/rustfix-asm.rs:13:9 | LL | asm!("" : "=r" (y)); | ----^^^^^^^^^^^^^^^^ |
