fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
563 B16 linesraw
1error[E0499]: cannot borrow `x` as mutable more than once at a time
2  --> $DIR/borrowck-autoref-3261.rs:15:9
3   |
4LL |     (&mut x).with(
5   |     -------- ---- first borrow later used by call
6   |     |
7   |     first mutable borrow occurs here
8LL |         |opt| {
9   |         ^^^^^ second mutable borrow occurs here
10...
11LL |                     x = X(Either::Left((0, 0)));
12   |                     - second borrow occurs due to use of `x` in closure
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0499`.