rust/tests/ui/nll/issue-52534-2.stderr

18 lines
488 B
Plaintext
Raw Normal View History

error[E0597]: `x` does not live long enough
--> $DIR/issue-52534-2.rs:6:13
|
2023-01-14 21:06:44 -06:00
LL | let x = 32;
| - binding `x` declared here
LL | y = &x
| ^^ borrowed value does not live long enough
2019-03-09 06:03:44 -06:00
LL |
LL | }
| - `x` dropped here while still borrowed
2022-06-08 13:07:59 -05:00
LL |
LL | println!("{}", y);
| - borrow later used here
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.