fork/rust

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

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

1.42.0
491 B13 linesraw
1error[E0506]: cannot assign to `x` because it is borrowed
2  --> $DIR/maybe-initialized-drop.rs:16:5
3   |
4LL |     let wrap = Wrap { p: &mut x };
5   |                          ------ borrow of `x` occurs here
6LL |     x = 1;
7   |     ^^^^^ assignment to borrowed `x` occurs here
8LL | }
9   | - borrow might be used here, when `wrap` is dropped and runs the `Drop` code for type `Wrap`
10
11error: aborting due to previous error
12
13For more information about this error, try `rustc --explain E0506`.