]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/retain-resume-ref.stderr
bc715c7030eb397e617376c4bb455e74f945d54f
[rust.git] / src / test / ui / generator / retain-resume-ref.stderr
1 error[E0499]: cannot borrow `thing` as mutable more than once at a time
2   --> $DIR/retain-resume-ref.rs:23:25
3    |
4 LL |     gen.as_mut().resume(&mut thing);
5    |                         ---------- first mutable borrow occurs here
6 LL |     gen.as_mut().resume(&mut thing);
7    |                         ^^^^^^^^^^ second mutable borrow occurs here
8 LL |
9 LL | }
10    | - first borrow might be used here, when `gen` is dropped and runs the destructor for generator
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0499`.