mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
656db98bd9
CC #99430
17 lines
540 B
Plaintext
17 lines
540 B
Plaintext
error[E0597]: `v` does not live long enough
|
|
--> $DIR/dropck-union.rs:37:18
|
|
|
|
|
LL | let v : Wrap<C> = Wrap::new(C(Cell::new(None)));
|
|
| - binding `v` declared here
|
|
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`.
|