fork/rust

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

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

1.44.0
586 B15 linesraw
1error[E0506]: cannot assign to `x` because it is borrowed
2  --> $DIR/maybe-initialized-drop-with-uninitialized-fragments.rs:22:5
3   |
4LL |     let wrap = Wrap { p: &mut x };
5   |                          ------ borrow of `x` occurs here
6...
7LL |     x = 1;
8   |     ^^^^^ assignment to borrowed `x` occurs here
9LL |     // FIXME ^ This currently errors and it should not.
10LL | }
11   | - borrow might be used here, when `foo` is dropped and runs the destructor for type `Foo<'_>`
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0506`.