blob: fa753d2e788575b34b8a819b6464a6944ec9d1ee (
plain)
1
2
3
4
5
6
7
8
|
error[E0716]: temporary value dropped while borrowed
--> $DIR/temporary-value.rs:4:22
|
4 | let _ = anyhow!(&String::new());
| ---------^^^^^^^^^^^^^-- temporary value is freed at the end of this statement
| | |
| | creates a temporary which is freed while still in use
| argument requires that borrow lasts for `'static`
|