fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
744 B18 linesraw
1error[E0499]: cannot borrow `*x` as mutable more than once at a time
2  --> $DIR/issue-110929-generator-conflict-error-ice.rs:8:9
3   |
4LL |         let _c = || yield *&mut *x;
5   |                  --             -- first borrow occurs due to use of `*x` in generator
6   |                  |
7   |                  first mutable borrow occurs here
8LL |         || _ = &mut *x;
9   |         ^^          -- second borrow occurs due to use of `*x` in closure
10   |         |
11   |         second mutable borrow occurs here
12LL |
13LL |     };
14   |     - first borrow might be used here, when `_c` is dropped and runs the destructor for generator
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0499`.