rust/tests/ui/dropck/dropck-union.stderr

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

17 lines
540 B
Plaintext
Raw Normal View History

error[E0597]: `v` does not live long enough
--> $DIR/dropck-union.rs:37:18
|
2023-01-14 21:06:44 -06:00
LL | let v : Wrap<C> = Wrap::new(C(Cell::new(None)));
| - binding `v` declared here
2019-03-09 06:03:44 -06:00
LL | v.0.set(Some(&v));
| ^^ borrowed value does not live long enough
LL | }
| -
| |
| `v` dropped here while still borrowed
| borrow might be used here, when `v` is dropped and runs the `Drop` code for type `Wrap`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.