1 error[E0597]: `mutex` does not live long enough
2 --> $DIR/format-args-temporaries-in-write.rs:41:27
4 LL | let mutex = Mutex;
5 | ----- binding `mutex` declared here
6 LL | write!(Out, "{}", mutex.lock()) /* no semicolon */
9 | borrowed value does not live long enough
10 | a temporary with access to the borrow is created here ...
13 | -- ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `MutexGuard`
15 | `mutex` dropped here while still borrowed
18 error[E0597]: `mutex` does not live long enough
19 --> $DIR/format-args-temporaries-in-write.rs:47:29
21 LL | let mutex = Mutex;
22 | ----- binding `mutex` declared here
23 LL | writeln!(Out, "{}", mutex.lock()) /* no semicolon */
26 | borrowed value does not live long enough
27 | a temporary with access to the borrow is created here ...
30 | -- ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `MutexGuard`
32 | `mutex` dropped here while still borrowed
35 error: aborting due to 2 previous errors
37 For more information about this error, try `rustc --explain E0597`.