2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: `x` does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
--> $DIR/send-is-not-static-std-sync-2.rs:22:5
|
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
21 | Mutex::new(&x)
|
2016-10-26 11:10:39 -05:00
|
|
|
| - borrow occurs here
|
2017-11-20 06:13:27 -06:00
|
|
|
22 | }; //~ ERROR does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
| ^ `x` dropped here while still borrowed
|
|
|
|
...
|
|
|
|
25 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: `x` does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
--> $DIR/send-is-not-static-std-sync-2.rs:31:5
|
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
30 | RwLock::new(&x)
|
2016-10-26 11:10:39 -05:00
|
|
|
| - borrow occurs here
|
2017-11-20 06:13:27 -06:00
|
|
|
31 | }; //~ ERROR does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
| ^ `x` dropped here while still borrowed
|
|
|
|
32 | let _dangling = *lock.read().unwrap();
|
|
|
|
33 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
2017-05-27 12:58:52 -05:00
|
|
|
error[E0597]: `x` does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
--> $DIR/send-is-not-static-std-sync-2.rs:41:5
|
|
|
|
|
|
2017-11-20 06:13:27 -06:00
|
|
|
39 | let _ = tx.send(&x);
|
2016-10-26 11:10:39 -05:00
|
|
|
| - borrow occurs here
|
|
|
|
40 | (tx, rx)
|
2017-11-20 06:13:27 -06:00
|
|
|
41 | }; //~ ERROR does not live long enough
|
2016-10-26 11:10:39 -05:00
|
|
|
| ^ `x` dropped here while still borrowed
|
|
|
|
...
|
|
|
|
44 | }
|
|
|
|
| - borrowed value needs to live until here
|
|
|
|
|
2017-07-02 05:49:30 -05:00
|
|
|
error: aborting due to 3 previous errors
|
2016-10-26 11:10:39 -05:00
|
|
|
|