• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error: not automatically applying `DerefMut` on `ManuallyDrop` union field
2  --> $DIR/union-deref.rs:16:14
3   |
4LL |     unsafe { u.f.0 = Vec::new() };
5   |              ^^^
6   |
7   = help: writing to this reference calls the destructor for the old value
8   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
9
10error: not automatically applying `DerefMut` on `ManuallyDrop` union field
11  --> $DIR/union-deref.rs:18:19
12   |
13LL |     unsafe { &mut u.f.0 };
14   |                   ^^^
15   |
16   = help: writing to this reference calls the destructor for the old value
17   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
18
19error: not automatically applying `DerefMut` on `ManuallyDrop` union field
20  --> $DIR/union-deref.rs:20:14
21   |
22LL |     unsafe { u.f.0.push(0) };
23   |              ^^^
24   |
25   = help: writing to this reference calls the destructor for the old value
26   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
27
28error: not automatically applying `DerefMut` on `ManuallyDrop` union field
29  --> $DIR/union-deref.rs:24:14
30   |
31LL |     unsafe { u.f.0.0 = Vec::new() };
32   |              ^^^^^
33   |
34   = help: writing to this reference calls the destructor for the old value
35   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
36
37error: not automatically applying `DerefMut` on `ManuallyDrop` union field
38  --> $DIR/union-deref.rs:26:19
39   |
40LL |     unsafe { &mut u.f.0.0 };
41   |                   ^^^^^
42   |
43   = help: writing to this reference calls the destructor for the old value
44   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
45
46error: not automatically applying `DerefMut` on `ManuallyDrop` union field
47  --> $DIR/union-deref.rs:28:14
48   |
49LL |     unsafe { u.f.0.0.push(0) };
50   |              ^^^^^
51   |
52   = help: writing to this reference calls the destructor for the old value
53   = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
54
55error: aborting due to 6 previous errors
56
57