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