fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
523 B14 linesraw
1error[E0502]: cannot borrow `t0` as mutable because it is also borrowed as immutable
2  --> $DIR/borrowck-swap-mut-base-ptr.rs:13:10
3   |
4LL |     let p: &isize = &*t0;     // Freezes `*t0`
5   |                     ---- immutable borrow occurs here
6LL |     swap(&mut t0, &mut t1);
7   |          ^^^^^^^ mutable borrow occurs here
8LL |     *t1 = 22;
9LL |     p.use_ref();
10   |     - immutable borrow later used here
11
12error: aborting due to previous error
13
14For more information about this error, try `rustc --explain E0502`.