| 1 |
error[E0716]: temporary value dropped while borrowed |
| 2 |
--> tests/ui/temporary-value.rs:4:22 |
| 3 |
| |
| 4 |
4 | let _ = anyhow!(&String::new()); |
| 5 |
| ---------^^^^^^^^^^^^^- |
| 6 |
| | | |
| 7 |
| | creates a temporary value which is freed while still in use |
| 8 |
| temporary value is freed at the end of this statement |
| 9 |
| argument requires that borrow lasts for `'static` |
| 10 |
| |
| 11 |
note: requirement that the value outlives `'static` introduced here |
| 12 |
--> src/kind.rs |
| 13 |
| |
| 14 |
| M: Display + Debug + Send + Sync + 'static, |
| 15 |
| ^^^^^^^ |