summaryrefslogtreecommitdiffstats
path: root/src/test/ui/union/union-deref.mirunsafeck.stderr
blob: be5e60ab88a5902b3baca89c4239db94340361a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
error: not automatically applying `DerefMut` on `ManuallyDrop` union field
  --> $DIR/union-deref.rs:16:14
   |
LL |     unsafe { u.f.0 = Vec::new() };
   |              ^^^
   |
   = help: writing to this reference 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: not automatically applying `DerefMut` on `ManuallyDrop` union field
  --> $DIR/union-deref.rs:18:19
   |
LL |     unsafe { &mut u.f.0 };
   |                   ^^^
   |
   = help: writing to this reference 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: not automatically applying `DerefMut` on `ManuallyDrop` union field
  --> $DIR/union-deref.rs:20:14
   |
LL |     unsafe { u.f.0.push(0) };
   |              ^^^
   |
   = help: writing to this reference 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: not automatically applying `DerefMut` on `ManuallyDrop` union field
  --> $DIR/union-deref.rs:24:14
   |
LL |     unsafe { u.f.0.0 = Vec::new() };
   |              ^^^^^
   |
   = help: writing to this reference 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: not automatically applying `DerefMut` on `ManuallyDrop` union field
  --> $DIR/union-deref.rs:26:19
   |
LL |     unsafe { &mut u.f.0.0 };
   |                   ^^^^^
   |
   = help: writing to this reference 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: not automatically applying `DerefMut` on `ManuallyDrop` union field
  --> $DIR/union-deref.rs:28:14
   |
LL |     unsafe { u.f.0.0.push(0) };
   |              ^^^^^
   |
   = help: writing to this reference 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 6 previous errors