diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/asm/x86_64 | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/ui/asm/x86_64/bad-clobber-abi.rs (renamed from src/test/ui/asm/x86_64/bad-clobber-abi.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/bad-clobber-abi.stderr (renamed from src/test/ui/asm/x86_64/bad-clobber-abi.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/bad-options.rs (renamed from src/test/ui/asm/x86_64/bad-options.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/bad-options.stderr (renamed from src/test/ui/asm/x86_64/bad-options.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/bad-reg.rs (renamed from src/test/ui/asm/x86_64/bad-reg.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/bad-reg.stderr (renamed from src/test/ui/asm/x86_64/bad-reg.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/const.rs (renamed from src/test/ui/asm/x86_64/const.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/duplicate-options.fixed (renamed from src/test/ui/asm/x86_64/duplicate-options.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/duplicate-options.rs (renamed from src/test/ui/asm/x86_64/duplicate-options.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/duplicate-options.stderr (renamed from src/test/ui/asm/x86_64/duplicate-options.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/interpolated-idents.rs (renamed from src/test/ui/asm/x86_64/interpolated-idents.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/interpolated-idents.stderr | 46 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/issue-82869.rs (renamed from src/test/ui/asm/x86_64/issue-82869.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/issue-82869.stderr (renamed from src/test/ui/asm/x86_64/issue-82869.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/issue-89875.rs (renamed from src/test/ui/asm/x86_64/issue-89875.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/issue-96797.rs (renamed from src/test/ui/asm/x86_64/issue-96797.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/may_unwind.rs (renamed from src/test/ui/asm/x86_64/may_unwind.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/multiple-clobber-abi.rs (renamed from src/test/ui/asm/x86_64/multiple-clobber-abi.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/parse-error.rs (renamed from src/test/ui/asm/x86_64/parse-error.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/parse-error.stderr (renamed from src/test/ui/asm/x86_64/parse-error.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/srcloc.rs (renamed from src/test/ui/asm/x86_64/srcloc.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/srcloc.stderr (renamed from src/test/ui/asm/x86_64/srcloc.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/sym.rs (renamed from src/test/ui/asm/x86_64/sym.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/target-feature-attr.rs (renamed from src/test/ui/asm/x86_64/target-feature-attr.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/target-feature-attr.stderr (renamed from src/test/ui/asm/x86_64/target-feature-attr.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-2.rs (renamed from src/test/ui/asm/x86_64/type-check-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-2.stderr (renamed from src/test/ui/asm/x86_64/type-check-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-3.rs (renamed from src/test/ui/asm/x86_64/type-check-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-3.stderr (renamed from src/test/ui/asm/x86_64/type-check-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-4.rs (renamed from src/test/ui/asm/x86_64/type-check-4.rs) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-4.stderr (renamed from src/test/ui/asm/x86_64/type-check-4.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-5.rs (renamed from src/test/ui/asm/x86_64/type-check-5.rs) | 3 | ||||
-rw-r--r-- | tests/ui/asm/x86_64/type-check-5.stderr | 46 |
33 files changed, 93 insertions, 2 deletions
diff --git a/src/test/ui/asm/x86_64/bad-clobber-abi.rs b/tests/ui/asm/x86_64/bad-clobber-abi.rs index ddcd2065b..ddcd2065b 100644 --- a/src/test/ui/asm/x86_64/bad-clobber-abi.rs +++ b/tests/ui/asm/x86_64/bad-clobber-abi.rs diff --git a/src/test/ui/asm/x86_64/bad-clobber-abi.stderr b/tests/ui/asm/x86_64/bad-clobber-abi.stderr index 46e91a395..46e91a395 100644 --- a/src/test/ui/asm/x86_64/bad-clobber-abi.stderr +++ b/tests/ui/asm/x86_64/bad-clobber-abi.stderr diff --git a/src/test/ui/asm/x86_64/bad-options.rs b/tests/ui/asm/x86_64/bad-options.rs index f7c2cd6c5..f7c2cd6c5 100644 --- a/src/test/ui/asm/x86_64/bad-options.rs +++ b/tests/ui/asm/x86_64/bad-options.rs diff --git a/src/test/ui/asm/x86_64/bad-options.stderr b/tests/ui/asm/x86_64/bad-options.stderr index e2351840e..e2351840e 100644 --- a/src/test/ui/asm/x86_64/bad-options.stderr +++ b/tests/ui/asm/x86_64/bad-options.stderr diff --git a/src/test/ui/asm/x86_64/bad-reg.rs b/tests/ui/asm/x86_64/bad-reg.rs index f5728079a..f5728079a 100644 --- a/src/test/ui/asm/x86_64/bad-reg.rs +++ b/tests/ui/asm/x86_64/bad-reg.rs diff --git a/src/test/ui/asm/x86_64/bad-reg.stderr b/tests/ui/asm/x86_64/bad-reg.stderr index 82b7ebd0f..82b7ebd0f 100644 --- a/src/test/ui/asm/x86_64/bad-reg.stderr +++ b/tests/ui/asm/x86_64/bad-reg.stderr diff --git a/src/test/ui/asm/x86_64/const.rs b/tests/ui/asm/x86_64/const.rs index d523ae021..d523ae021 100644 --- a/src/test/ui/asm/x86_64/const.rs +++ b/tests/ui/asm/x86_64/const.rs diff --git a/src/test/ui/asm/x86_64/duplicate-options.fixed b/tests/ui/asm/x86_64/duplicate-options.fixed index c5f14f5f7..c5f14f5f7 100644 --- a/src/test/ui/asm/x86_64/duplicate-options.fixed +++ b/tests/ui/asm/x86_64/duplicate-options.fixed diff --git a/src/test/ui/asm/x86_64/duplicate-options.rs b/tests/ui/asm/x86_64/duplicate-options.rs index a8dce1f8d..a8dce1f8d 100644 --- a/src/test/ui/asm/x86_64/duplicate-options.rs +++ b/tests/ui/asm/x86_64/duplicate-options.rs diff --git a/src/test/ui/asm/x86_64/duplicate-options.stderr b/tests/ui/asm/x86_64/duplicate-options.stderr index 53edf8fb9..53edf8fb9 100644 --- a/src/test/ui/asm/x86_64/duplicate-options.stderr +++ b/tests/ui/asm/x86_64/duplicate-options.stderr diff --git a/src/test/ui/asm/x86_64/interpolated-idents.rs b/tests/ui/asm/x86_64/interpolated-idents.rs index c05633ae8..c05633ae8 100644 --- a/src/test/ui/asm/x86_64/interpolated-idents.rs +++ b/tests/ui/asm/x86_64/interpolated-idents.rs diff --git a/tests/ui/asm/x86_64/interpolated-idents.stderr b/tests/ui/asm/x86_64/interpolated-idents.stderr new file mode 100644 index 000000000..80a8c8c77 --- /dev/null +++ b/tests/ui/asm/x86_64/interpolated-idents.stderr @@ -0,0 +1,46 @@ +error: the `nomem` and `readonly` options are mutually exclusive + --> $DIR/interpolated-idents.rs:13:13 + | +LL | $options($pure, $nomem, $readonly, $preserves_flags, $noreturn, $nostack, $att_syntax)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | / m!(in out lateout inout inlateout const sym +LL | | pure nomem readonly preserves_flags +LL | | noreturn nostack att_syntax options); + | |___________________________________________- in this macro invocation + | + = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: the `pure` and `noreturn` options are mutually exclusive + --> $DIR/interpolated-idents.rs:13:13 + | +LL | $options($pure, $nomem, $readonly, $preserves_flags, $noreturn, $nostack, $att_syntax)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | / m!(in out lateout inout inlateout const sym +LL | | pure nomem readonly preserves_flags +LL | | noreturn nostack att_syntax options); + | |___________________________________________- in this macro invocation + | + = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: asm outputs are not allowed with the `noreturn` option + --> $DIR/interpolated-idents.rs:10:32 + | +LL | asm!("", $in(x) x, $out(x) x, $lateout(x) x, $inout(x) x, $inlateout(x) x, + | ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ +... +LL | / m!(in out lateout inout inlateout const sym +LL | | pure nomem readonly preserves_flags +LL | | noreturn nostack att_syntax options); + | | - + | |___________________________________________| + | |___________________________________________in this macro invocation + | |___________________________________________in this macro invocation + | |___________________________________________in this macro invocation + | in this macro invocation + | + = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/asm/x86_64/issue-82869.rs b/tests/ui/asm/x86_64/issue-82869.rs index 67933666e..67933666e 100644 --- a/src/test/ui/asm/x86_64/issue-82869.rs +++ b/tests/ui/asm/x86_64/issue-82869.rs diff --git a/src/test/ui/asm/x86_64/issue-82869.stderr b/tests/ui/asm/x86_64/issue-82869.stderr index 3cf9d6d1c..3cf9d6d1c 100644 --- a/src/test/ui/asm/x86_64/issue-82869.stderr +++ b/tests/ui/asm/x86_64/issue-82869.stderr diff --git a/src/test/ui/asm/x86_64/issue-89875.rs b/tests/ui/asm/x86_64/issue-89875.rs index 669fd7e7e..669fd7e7e 100644 --- a/src/test/ui/asm/x86_64/issue-89875.rs +++ b/tests/ui/asm/x86_64/issue-89875.rs diff --git a/src/test/ui/asm/x86_64/issue-96797.rs b/tests/ui/asm/x86_64/issue-96797.rs index 954f8c5cc..954f8c5cc 100644 --- a/src/test/ui/asm/x86_64/issue-96797.rs +++ b/tests/ui/asm/x86_64/issue-96797.rs diff --git a/src/test/ui/asm/x86_64/may_unwind.rs b/tests/ui/asm/x86_64/may_unwind.rs index c11f0938d..c11f0938d 100644 --- a/src/test/ui/asm/x86_64/may_unwind.rs +++ b/tests/ui/asm/x86_64/may_unwind.rs diff --git a/src/test/ui/asm/x86_64/multiple-clobber-abi.rs b/tests/ui/asm/x86_64/multiple-clobber-abi.rs index 06589431a..06589431a 100644 --- a/src/test/ui/asm/x86_64/multiple-clobber-abi.rs +++ b/tests/ui/asm/x86_64/multiple-clobber-abi.rs diff --git a/src/test/ui/asm/x86_64/parse-error.rs b/tests/ui/asm/x86_64/parse-error.rs index 9aeb6b285..9aeb6b285 100644 --- a/src/test/ui/asm/x86_64/parse-error.rs +++ b/tests/ui/asm/x86_64/parse-error.rs diff --git a/src/test/ui/asm/x86_64/parse-error.stderr b/tests/ui/asm/x86_64/parse-error.stderr index 57702c37b..57702c37b 100644 --- a/src/test/ui/asm/x86_64/parse-error.stderr +++ b/tests/ui/asm/x86_64/parse-error.stderr diff --git a/src/test/ui/asm/x86_64/srcloc.rs b/tests/ui/asm/x86_64/srcloc.rs index 1135ad2e1..1135ad2e1 100644 --- a/src/test/ui/asm/x86_64/srcloc.rs +++ b/tests/ui/asm/x86_64/srcloc.rs diff --git a/src/test/ui/asm/x86_64/srcloc.stderr b/tests/ui/asm/x86_64/srcloc.stderr index 8899c1b91..8899c1b91 100644 --- a/src/test/ui/asm/x86_64/srcloc.stderr +++ b/tests/ui/asm/x86_64/srcloc.stderr diff --git a/src/test/ui/asm/x86_64/sym.rs b/tests/ui/asm/x86_64/sym.rs index 93ef4f090..93ef4f090 100644 --- a/src/test/ui/asm/x86_64/sym.rs +++ b/tests/ui/asm/x86_64/sym.rs diff --git a/src/test/ui/asm/x86_64/target-feature-attr.rs b/tests/ui/asm/x86_64/target-feature-attr.rs index 14490c3e0..14490c3e0 100644 --- a/src/test/ui/asm/x86_64/target-feature-attr.rs +++ b/tests/ui/asm/x86_64/target-feature-attr.rs diff --git a/src/test/ui/asm/x86_64/target-feature-attr.stderr b/tests/ui/asm/x86_64/target-feature-attr.stderr index c852726ee..c852726ee 100644 --- a/src/test/ui/asm/x86_64/target-feature-attr.stderr +++ b/tests/ui/asm/x86_64/target-feature-attr.stderr diff --git a/src/test/ui/asm/x86_64/type-check-2.rs b/tests/ui/asm/x86_64/type-check-2.rs index 80b29ec87..80b29ec87 100644 --- a/src/test/ui/asm/x86_64/type-check-2.rs +++ b/tests/ui/asm/x86_64/type-check-2.rs diff --git a/src/test/ui/asm/x86_64/type-check-2.stderr b/tests/ui/asm/x86_64/type-check-2.stderr index d9ca25519..d9ca25519 100644 --- a/src/test/ui/asm/x86_64/type-check-2.stderr +++ b/tests/ui/asm/x86_64/type-check-2.stderr diff --git a/src/test/ui/asm/x86_64/type-check-3.rs b/tests/ui/asm/x86_64/type-check-3.rs index 89c849c75..89c849c75 100644 --- a/src/test/ui/asm/x86_64/type-check-3.rs +++ b/tests/ui/asm/x86_64/type-check-3.rs diff --git a/src/test/ui/asm/x86_64/type-check-3.stderr b/tests/ui/asm/x86_64/type-check-3.stderr index 1baf50ff6..1baf50ff6 100644 --- a/src/test/ui/asm/x86_64/type-check-3.stderr +++ b/tests/ui/asm/x86_64/type-check-3.stderr diff --git a/src/test/ui/asm/x86_64/type-check-4.rs b/tests/ui/asm/x86_64/type-check-4.rs index 3d5d3807c..3d5d3807c 100644 --- a/src/test/ui/asm/x86_64/type-check-4.rs +++ b/tests/ui/asm/x86_64/type-check-4.rs diff --git a/src/test/ui/asm/x86_64/type-check-4.stderr b/tests/ui/asm/x86_64/type-check-4.stderr index 3875bcc21..3875bcc21 100644 --- a/src/test/ui/asm/x86_64/type-check-4.stderr +++ b/tests/ui/asm/x86_64/type-check-4.stderr diff --git a/src/test/ui/asm/x86_64/type-check-5.rs b/tests/ui/asm/x86_64/type-check-5.rs index 8198df910..1d579ccc9 100644 --- a/src/test/ui/asm/x86_64/type-check-5.rs +++ b/tests/ui/asm/x86_64/type-check-5.rs @@ -22,11 +22,10 @@ fn main() { // Outputs require mutable places let v: Vec<u64> = vec![0, 1, 2]; + //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable asm!("{}", in(reg) v[0]); asm!("{}", out(reg) v[0]); - //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable asm!("{}", inout(reg) v[0]); - //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable // Sym operands must point to a function or static diff --git a/tests/ui/asm/x86_64/type-check-5.stderr b/tests/ui/asm/x86_64/type-check-5.stderr new file mode 100644 index 000000000..7970e76d6 --- /dev/null +++ b/tests/ui/asm/x86_64/type-check-5.stderr @@ -0,0 +1,46 @@ +error[E0381]: used binding `x` isn't initialized + --> $DIR/type-check-5.rs:15:28 + | +LL | let x: u64; + | - binding declared here but left uninitialized +LL | asm!("{}", in(reg) x); + | ^ `x` used here but it isn't initialized + | +help: consider assigning a value + | +LL | let x: u64 = 0; + | +++ + +error[E0381]: used binding `y` isn't initialized + --> $DIR/type-check-5.rs:18:9 + | +LL | let mut y: u64; + | ----- binding declared here but left uninitialized +LL | asm!("{}", inout(reg) y); + | ^^^^^^^^^^^^^^^^^^^^^^^^ `y` used here but it isn't initialized + | +help: consider assigning a value + | +LL | let mut y: u64 = 0; + | +++ + +error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable + --> $DIR/type-check-5.rs:24:13 + | +LL | let v: Vec<u64> = vec![0, 1, 2]; + | ^ not mutable +... +LL | asm!("{}", out(reg) v[0]); + | - cannot borrow as mutable +LL | asm!("{}", inout(reg) v[0]); + | - cannot borrow as mutable + | +help: consider changing this to be mutable + | +LL | let mut v: Vec<u64> = vec![0, 1, 2]; + | +++ + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0381, E0596. +For more information about an error, try `rustc --explain E0381`. |