rust/tests/ui/span/wf-method-late-bound-regions.stderr
Esteban Küber 656db98bd9 Tweak E0597
CC #99430
2023-01-15 19:46:20 +00:00

16 lines
554 B
Plaintext

error[E0597]: `pointer` does not live long enough
--> $DIR/wf-method-late-bound-regions.rs:20:18
|
LL | let dangling = {
| -------- borrow later stored here
LL | let pointer = Box::new(42);
| ------- binding `pointer` declared here
LL | f2.xmute(&pointer)
| ^^^^^^^^ borrowed value does not live long enough
LL | };
| - `pointer` dropped here while still borrowed
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.