1 error[E0597]: `mutex` does not live long enough
2 --> $DIR/format-args-temporaries-in-write.rs:41:27
4 LL | write!(Out, "{}", mutex.lock()) /* no semicolon */
7 | borrowed value does not live long enough
8 | a temporary with access to the borrow is created here ...
11 | -- ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `MutexGuard`
13 | `mutex` dropped here while still borrowed
16 error[E0597]: `mutex` does not live long enough
17 --> $DIR/format-args-temporaries-in-write.rs:47:29
19 LL | writeln!(Out, "{}", mutex.lock()) /* no semicolon */
22 | borrowed value does not live long enough
23 | a temporary with access to the borrow is created here ...
26 | -- ... and the borrow might be used here, when that temporary is dropped and runs the `Drop` code for type `MutexGuard`
28 | `mutex` dropped here while still borrowed
31 error: aborting due to 2 previous errors
33 For more information about this error, try `rustc --explain E0597`.