summaryrefslogtreecommitdiffstats
path: root/tests/ui/span
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr2
-rw-r--r--tests/ui/span/issue-29595.stderr6
-rw-r--r--tests/ui/span/move-closure.stderr2
-rw-r--r--tests/ui/span/send-is-not-static-std-sync.rs2
-rw-r--r--tests/ui/span/send-is-not-static-std-sync.stderr8
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