]> git.lizzy.rs Git - rust.git/blob - tests/ui/generator/dropck-resume.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / generator / dropck-resume.stderr
1 error[E0502]: cannot borrow `y` as immutable because it is also borrowed as mutable
2   --> $DIR/dropck-resume.rs:25:13
3    |
4 LL |     let z = &mut y;
5    |             ------ mutable borrow occurs here
6 ...
7 LL |         r = y.as_ref().unwrap();
8    |             ^^^^^^^^^^ immutable borrow occurs here
9 LL |
10 LL |     }
11    |     - mutable borrow might be used here, when `g` is dropped and runs the destructor for generator
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0502`.