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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
489 B
Plaintext
Raw Normal View History

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