mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:01:17 +01:00
aef0f4024a
And suggest adding the `#[coroutine]` to the closure
16 lines
519 B
Plaintext
16 lines
519 B
Plaintext
error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
|
|
--> $DIR/dropck-resume.rs:26:13
|
|
|
|
|
LL | let z = &mut y;
|
|
| ------ mutable borrow occurs here
|
|
...
|
|
LL | r = y.as_ref().unwrap();
|
|
| ^ immutable borrow occurs here
|
|
LL |
|
|
LL | }
|
|
| - mutable borrow might be used here, when `g` is dropped and runs the destructor for coroutine
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0502`.
|