os-rust/tests/ui/nll/capture-ref-in-struct.stderr

19 lines
491 B
Text
Raw Normal View History

error[E0597]: `y` does not live long enough
--> $DIR/capture-ref-in-struct.rs:18:16
|
2023-01-15 03:06:44 +00:00
LL | let y = 22;
| - binding `y` declared here
...
2018-02-23 03:42:32 +03:00
LL | y: &y,
| ^^ borrowed value does not live long enough
...
2018-02-23 03:42:32 +03:00
LL | }
| - `y` dropped here while still borrowed
2022-06-08 21:07:59 +03:00
LL |
2018-02-23 03:42:32 +03:00
LL | deref(p);
| - borrow later used here
error: aborting due to 1 previous error
2018-03-03 15:59:40 +01:00
For more information about this error, try `rustc --explain E0597`.