blob: 74b0541c01b2f68e867f8387f04ce74c0dc5c1e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
error[E0597]: borrowed value does not live long enough
--> $DIR/issue-27592.rs:26:27
|
LL | write(|| format_args!("{}", String::from("Hello world")));
| ^^^^ -- temporary value needs to live until here
| | |
| | temporary value dropped here while still borrowed
| temporary value does not live long enough
error[E0597]: borrowed value does not live long enough
--> $DIR/issue-27592.rs:26:33
|
LL | write(|| format_args!("{}", String::from("Hello world")));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^-- temporary value needs to live until here
| | |
| | temporary value dropped here while still borrowed
| temporary value does not live long enough
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0597`.
|