1 error[E0505]: cannot move out of `y` because it is borrowed
2 --> $DIR/send-is-not-static-std-sync.rs:13:10
4 LL | *lock.lock().unwrap() = &*y;
5 | --- borrow of `*y` occurs here
7 | ^ move out of `y` occurs here
9 LL | *lock.lock().unwrap() = &z;
10 | ----------- borrow later used here
12 error[E0597]: `z` does not live long enough
13 --> $DIR/send-is-not-static-std-sync.rs:16:33
15 LL | *lock.lock().unwrap() = &z;
16 | ^^ borrowed value does not live long enough
18 | - `z` dropped here while still borrowed
20 LL | lock.use_ref(); // (Mutex is #[may_dangle] so its dtor does not use `z` => needs explicit use)
21 | -------------- borrow later used here
23 error[E0505]: cannot move out of `y` because it is borrowed
24 --> $DIR/send-is-not-static-std-sync.rs:27:10
26 LL | *lock.write().unwrap() = &*y;
27 | --- borrow of `*y` occurs here
29 | ^ move out of `y` occurs here
31 LL | *lock.write().unwrap() = &z;
32 | ------------ borrow later used here
34 error[E0597]: `z` does not live long enough
35 --> $DIR/send-is-not-static-std-sync.rs:30:34
37 LL | *lock.write().unwrap() = &z;
38 | ^^ borrowed value does not live long enough
40 | - `z` dropped here while still borrowed
42 LL | lock.use_ref(); // (RwLock is #[may_dangle] so its dtor does not use `z` => needs explicit use)
43 | -------------- borrow later used here
45 error[E0505]: cannot move out of `y` because it is borrowed
46 --> $DIR/send-is-not-static-std-sync.rs:43:10
49 | --- borrow of `*y` occurs here
51 | ^ move out of `y` occurs here
53 LL | tx.send(&z).unwrap();
54 | ----------- borrow later used here
56 error[E0597]: `z` does not live long enough
57 --> $DIR/send-is-not-static-std-sync.rs:46:17
59 LL | tx.send(&z).unwrap();
60 | ^^ borrowed value does not live long enough
62 | - `z` dropped here while still borrowed
65 | - borrow might be used here, when `tx` is dropped and runs the `Drop` code for type `Sender`
67 = note: values in a scope are dropped in the opposite order they are defined
69 error: aborting due to 6 previous errors
71 Some errors have detailed explanations: E0505, E0597.
72 For more information about an error, try `rustc --explain E0505`.