fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable 2 --> $DIR/method-self-arg-2.rs:15:14 3 | 4LL | let y = &mut x; 5 | ------ mutable borrow occurs here 6LL | Foo::bar(&x); 7 | ^^ immutable borrow occurs here 8LL | y.use_mut(); 9 | - mutable borrow later used here 10 11error[E0499]: cannot borrow `x` as mutable more than once at a time 12 --> $DIR/method-self-arg-2.rs:20:14 13 | 14LL | let y = &mut x; 15 | ------ first mutable borrow occurs here 16LL | Foo::baz(&mut x); 17 | ^^^^^^ second mutable borrow occurs here 18LL | y.use_mut(); 19 | - first borrow later used here 20 21error: aborting due to 2 previous errors 22 23Some errors have detailed explanations: E0499, E0502. 24For more information about an error, try `rustc --explain E0499`.