1 error[E0499]: cannot borrow `thing` as mutable more than once at a time
2 --> $DIR/retain-resume-ref.rs:23:25
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
10 | - first borrow might be used here, when `gen` is dropped and runs the destructor for generator
12 error: aborting due to previous error
14 For more information about this error, try `rustc --explain E0499`.