]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/send-is-not-static-std-sync-2.stderr
Auto merge of #55780 - ogoffart:span_source_text, r=petrochenkov
[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:21
3    |
4 LL |         Mutex::new(&x)
5    |                     ^ borrowed value does not live long enough
6 LL |     };
7    |     - `x` dropped here while still borrowed
8 ...
9 LL | }
10    | - borrowed value needs to live until here
11
12 error[E0597]: `x` does not live long enough
13   --> $DIR/send-is-not-static-std-sync-2.rs:21:22
14    |
15 LL |         RwLock::new(&x)
16    |                      ^ borrowed value does not live long enough
17 LL |     };
18    |     - `x` dropped here while still borrowed
19 ...
20 LL | }
21    | - borrowed value needs to live until here
22
23 error[E0597]: `x` does not live long enough
24   --> $DIR/send-is-not-static-std-sync-2.rs:31:26
25    |
26 LL |         let _ = tx.send(&x);
27    |                          ^ borrowed value does not live long enough
28 LL |         (tx, rx)
29 LL |     };
30    |     - `x` dropped here while still borrowed
31 ...
32 LL | }
33    | - borrowed value needs to live until here
34
35 error: aborting due to 3 previous errors
36
37 For more information about this error, try `rustc --explain E0597`.