1 error[E0515]: cannot return value referencing temporary value
2 --> $DIR/issue-27592.rs:16:14
4 LL | write(|| format_args!("{}", String::from("Hello world")));
5 | ^^^^^^^^^^^^^^^^^^^---------------------------^
7 | | temporary value created here
8 | returns a value referencing data owned by the current function
10 error[E0515]: cannot return value referencing temporary value
11 --> $DIR/issue-27592.rs:16:14
13 LL | write(|| format_args!("{}", String::from("Hello world")));
14 | ^^^^^^^^^^^^^----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 | | temporary value created here
17 | returns a value referencing data owned by the current function
19 error: aborting due to 2 previous errors
21 For more information about this error, try `rustc --explain E0515`.