fork/rust

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

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

1.42.0
796 B22 linesraw
1error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable
2  --> $DIR/issue-34126.rs:6:18
3   |
4LL |         self.run(&mut self);
5   |                  ^^^^^^^^^
6   |                  |
7   |                  cannot borrow as mutable
8   |                  try removing `&mut` here
9
10error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable
11  --> $DIR/issue-34126.rs:6:18
12   |
13LL |         self.run(&mut self);
14   |         ---- --- ^^^^^^^^^ mutable borrow occurs here
15   |         |    |
16   |         |    immutable borrow later used by call
17   |         immutable borrow occurs here
18
19error: aborting due to 2 previous errors
20
21Some errors have detailed explanations: E0502, E0596.
22For more information about an error, try `rustc --explain E0502`.