mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
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`.
|