2020-08-16 03:07:33 -05:00
|
|
|
error: not automatically applying `DerefMut` on union field
|
2020-08-16 03:24:10 -05:00
|
|
|
--> $DIR/union-deref.rs:14:14
|
2020-08-16 03:07:33 -05:00
|
|
|
|
|
|
|
|
LL | unsafe { u.f.0 = Vec::new() };
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
= help: writing to this field calls the destructor for the old value
|
|
|
|
= help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
|
|
|
|
|
2020-08-16 03:24:10 -05:00
|
|
|
error: not automatically applying `DerefMut` on union field
|
|
|
|
--> $DIR/union-deref.rs:18:14
|
|
|
|
|
|
|
|
|
LL | unsafe { u.f.0.0 = Vec::new() };
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
= help: writing to this field calls the destructor for the old value
|
|
|
|
= help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2020-08-16 03:07:33 -05:00
|
|
|
|