]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/send-is-not-static-std-sync-2.stderr
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
[rust.git] / src / test / ui / span / send-is-not-static-std-sync-2.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/send-is-not-static-std-sync-2.rs:11:20
3    |
4 LL |     let lock = {
5    |         ---- borrow later stored here
6 LL |         let x = 1;
7 LL |         Mutex::new(&x)
8    |                    ^^ borrowed value does not live long enough
9 LL |     };
10    |     - `x` dropped here while still borrowed
11
12 error[E0597]: `x` does not live long enough
13   --> $DIR/send-is-not-static-std-sync-2.rs:21:21
14    |
15 LL |     let lock = {
16    |         ---- borrow later stored here
17 LL |         let x = 1;
18 LL |         RwLock::new(&x)
19    |                     ^^ borrowed value does not live long enough
20 LL |     };
21    |     - `x` dropped here while still borrowed
22
23 error[E0597]: `x` does not live long enough
24   --> $DIR/send-is-not-static-std-sync-2.rs:31:25
25    |
26 LL |     let (_tx, rx) = {
27    |          --- borrow later used here
28 ...
29 LL |         let _ = tx.send(&x);
30    |                         ^^ borrowed value does not live long enough
31 LL |         (tx, rx)
32 LL |     };
33    |     - `x` dropped here while still borrowed
34
35 error: aborting due to 3 previous errors
36
37 For more information about this error, try `rustc --explain E0597`.