fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error[E0597]: `x` does not live long enough 2 --> $DIR/send-is-not-static-std-sync-2.rs:11:20 3 | 4LL | let lock = { 5 | ---- borrow later stored here 6LL | let x = 1; 7LL | Mutex::new(&x) 8 | ^^ borrowed value does not live long enough 9LL | }; 10 | - `x` dropped here while still borrowed 11 12error[E0597]: `x` does not live long enough 13 --> $DIR/send-is-not-static-std-sync-2.rs:21:21 14 | 15LL | let lock = { 16 | ---- borrow later stored here 17LL | let x = 1; 18LL | RwLock::new(&x) 19 | ^^ borrowed value does not live long enough 20LL | }; 21 | - `x` dropped here while still borrowed 22 23error[E0597]: `x` does not live long enough 24 --> $DIR/send-is-not-static-std-sync-2.rs:31:25 25 | 26LL | let (_tx, rx) = { 27 | --- borrow later used here 28... 29LL | let _ = tx.send(&x); 30 | ^^ borrowed value does not live long enough 31LL | (tx, rx) 32LL | }; 33 | - `x` dropped here while still borrowed 34 35error: aborting due to 3 previous errors 36 37For more information about this error, try `rustc --explain E0597`.