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