2017-11-17 04:34:02 -05:00
|
|
|
error[E0506]: cannot assign to `x` because it is borrowed
|
2017-12-14 15:01:05 -05:00
|
|
|
--> $DIR/maybe-initialized-drop-implicit-fragment-drop.rs:32:5
|
2017-11-17 04:34:02 -05:00
|
|
|
|
|
2017-12-14 15:01:05 -05:00
|
|
|
28 | let wrap = Wrap { p: &mut x };
|
2017-11-17 04:34:02 -05:00
|
|
|
| ------ borrow of `x` occurs here
|
|
|
|
...
|
2017-12-14 15:01:05 -05:00
|
|
|
32 | x = 1; //~ ERROR cannot assign to `x` because it is borrowed [E0506]
|
2017-11-17 04:34:02 -05:00
|
|
|
| ^^^^^ assignment to borrowed `x` occurs here
|
2017-12-14 15:01:05 -05:00
|
|
|
33 | // FIXME ^ Should not error in the future with implicit dtors, only manually implemented ones
|
|
|
|
34 | }
|
2018-01-13 23:28:00 +00:00
|
|
|
| - borrow later used here, when `foo` is dropped
|
2017-11-17 04:34:02 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|