fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
562 B15 linesraw
1error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
2  --> $DIR/borrowed-referent-issue-38899.rs:13:21
3   |
4LL |     let x = &mut block;
5   |             ---------- mutable borrow occurs here
6LL |     println!("{}", x.current);
7LL |     let p: &'a u8 = &*block.current;
8   |                     ^^^^^^^^^^^^^^^ immutable borrow occurs here
9LL |
10LL |     drop(x);
11   |          - mutable borrow later used here
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0502`.