mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
15 lines
556 B
Text
15 lines
556 B
Text
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 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|