diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:36 +0000 |
commit | e02c5b5930c2c9ba3e5423fe12e2ef0155017297 (patch) | |
tree | fd60ebbbb5299e16e5fca8c773ddb74f764760db /tests/ui/span | |
parent | Adding debian version 1.73.0+dfsg1-1. (diff) | |
download | rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.tar.xz rustc-e02c5b5930c2c9ba3e5423fe12e2ef0155017297.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/span')
-rw-r--r-- | tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr | 2 | ||||
-rw-r--r-- | tests/ui/span/issue-29595.stderr | 6 | ||||
-rw-r--r-- | tests/ui/span/move-closure.stderr | 2 | ||||
-rw-r--r-- | tests/ui/span/send-is-not-static-std-sync.rs | 2 | ||||
-rw-r--r-- | tests/ui/span/send-is-not-static-std-sync.stderr | 8 |
5 files changed, 12 insertions, 8 deletions
diff --git a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr index ba8da2e75..29a606c4f 100644 --- a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr +++ b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr @@ -42,7 +42,7 @@ LL | f(Box::new(|a| { | --- captured by this `FnMut` closure LL | LL | foo(f); - | ^ move occurs because `f` has type `[closure@$DIR/borrowck-call-is-borrow-issue-12224.rs:52:17: 52:58]`, which does not implement the `Copy` trait + | ^ move occurs because `f` has type `{closure@$DIR/borrowck-call-is-borrow-issue-12224.rs:52:17: 52:58}`, which does not implement the `Copy` trait error[E0505]: cannot move out of `f` because it is borrowed --> $DIR/borrowck-call-is-borrow-issue-12224.rs:55:16 diff --git a/tests/ui/span/issue-29595.stderr b/tests/ui/span/issue-29595.stderr index 92445e407..7d603cdbf 100644 --- a/tests/ui/span/issue-29595.stderr +++ b/tests/ui/span/issue-29595.stderr @@ -3,6 +3,12 @@ error[E0277]: the trait bound `u8: Tr` is not satisfied | LL | let a: u8 = Tr::C; | ^^^^^ the trait `Tr` is not implemented for `u8` + | +help: this trait has no implementations, consider adding one + --> $DIR/issue-29595.rs:1:1 + | +LL | trait Tr { + | ^^^^^^^^ error: aborting due to previous error diff --git a/tests/ui/span/move-closure.stderr b/tests/ui/span/move-closure.stderr index dcc607896..2127b8202 100644 --- a/tests/ui/span/move-closure.stderr +++ b/tests/ui/span/move-closure.stderr @@ -7,7 +7,7 @@ LL | let x: () = move || (); | expected due to this | = note: expected unit type `()` - found closure `[closure@$DIR/move-closure.rs:5:17: 5:24]` + found closure `{closure@$DIR/move-closure.rs:5:17: 5:24}` help: use parentheses to call this closure | LL | let x: () = (move || ())(); diff --git a/tests/ui/span/send-is-not-static-std-sync.rs b/tests/ui/span/send-is-not-static-std-sync.rs index f8ab5243c..9c1ee2871 100644 --- a/tests/ui/span/send-is-not-static-std-sync.rs +++ b/tests/ui/span/send-is-not-static-std-sync.rs @@ -46,7 +46,7 @@ fn channel() { tx.send(&z).unwrap(); } //~^^ ERROR `z` does not live long enough - // (channels lack #[may_dangle], thus their dtors are implicit uses of `z`) + tx.use_ref(); // (channel drop glue does not use `z` => needs explicit use) } fn main() {} diff --git a/tests/ui/span/send-is-not-static-std-sync.stderr b/tests/ui/span/send-is-not-static-std-sync.stderr index eaba415ad..46534b391 100644 --- a/tests/ui/span/send-is-not-static-std-sync.stderr +++ b/tests/ui/span/send-is-not-static-std-sync.stderr @@ -75,11 +75,9 @@ LL | tx.send(&z).unwrap(); | ^^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -... -LL | } - | - borrow might be used here, when `tx` is dropped and runs the `Drop` code for type `Sender` - | - = note: values in a scope are dropped in the opposite order they are defined +LL | +LL | tx.use_ref(); // (channel drop glue does not use `z` => needs explicit use) + | -- borrow later used here error: aborting due to 6 previous errors |