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
491 B
Plaintext
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 00:42:32 +00:00
LL | y: &y,
| ^^ borrowed value does not live long enough
...
2018-02-23 00:42:32 +00:00
LL | }
| - `y` dropped here while still borrowed
2022-06-08 18:07:59 +00:00
LL |
2018-02-23 00:42:32 +00:00
LL | deref(p);
| - borrow later used here
error: aborting due to 1 previous error
2018-03-03 14:59:40 +00:00
For more information about this error, try `rustc --explain E0597`.