forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathformat-args-temporary-scopes.e2024.stderr
More file actions
27 lines (24 loc) · 1.16 KB
/
format-args-temporary-scopes.e2024.stderr
File metadata and controls
27 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
error[E0716]: temporary value dropped while borrowed
--> $DIR/format-args-temporary-scopes.rs:13:25
|
LL | println!("{:?}", { &temp() });
| ---^^^^^---
| | | |
| | | temporary value is freed at the end of this statement
| | creates a temporary value which is freed while still in use
| borrow later used here
|
= note: consider using a `let` binding to create a longer lived value
error[E0716]: temporary value dropped while borrowed
--> $DIR/format-args-temporary-scopes.rs:19:29
|
LL | println!("{:?}{:?}", { &temp() }, ());
| ---^^^^^---
| | | |
| | | temporary value is freed at the end of this statement
| | creates a temporary value which is freed while still in use
| borrow later used here
|
= note: consider using a `let` binding to create a longer lived value
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0716`.