fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
761 B22 linesraw
1error[E0499]: cannot borrow `foo` as mutable more than once at a time
2  --> $DIR/two-phase-multi-mut.rs:11:5
3   |
4LL |     foo.method(&mut foo);
5   |     ^^^^------^--------^
6   |     |   |      |
7   |     |   |      first mutable borrow occurs here
8   |     |   first borrow later used by call
9   |     second mutable borrow occurs here
10
11error[E0499]: cannot borrow `foo` as mutable more than once at a time
12  --> $DIR/two-phase-multi-mut.rs:11:16
13   |
14LL |     foo.method(&mut foo);
15   |     --- ------ ^^^^^^^^ second mutable borrow occurs here
16   |     |   |
17   |     |   first borrow later used by call
18   |     first mutable borrow occurs here
19
20error: aborting due to 2 previous errors
21
22For more information about this error, try `rustc --explain E0499`.