@@ -26,7 +26,34 @@ LL | unsafe { u.f.0.push(0) };
2626 = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
2727
2828error: not automatically applying `DerefMut` on `ManuallyDrop` union field
29- --> $DIR/union-deref.rs:21:14
29+ --> $DIR/union-deref.rs:20:14
30+ |
31+ LL | unsafe { (&mut u).f.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+
37+ error: not automatically applying `DerefMut` on `ManuallyDrop` union field
38+ --> $DIR/union-deref.rs:22:19
39+ |
40+ LL | unsafe { &mut (&mut u).f.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+
46+ error: not automatically applying `DerefMut` on `ManuallyDrop` union field
47+ --> $DIR/union-deref.rs:24:14
48+ |
49+ LL | unsafe { (&mut u).f.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+
55+ error: not automatically applying `DerefMut` on `ManuallyDrop` union field
56+ --> $DIR/union-deref.rs:29:14
3057 |
3158LL | unsafe { u.f.0.0 = Vec::new() };
3259 | ^^^^^
@@ -35,7 +62,7 @@ LL | unsafe { u.f.0.0 = Vec::new() };
3562 = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
3663
3764error: not automatically applying `DerefMut` on `ManuallyDrop` union field
38- --> $DIR/union-deref.rs:23 :19
65+ --> $DIR/union-deref.rs:31 :19
3966 |
4067LL | unsafe { &mut u.f.0.0 };
4168 | ^^^^^
@@ -44,13 +71,40 @@ LL | unsafe { &mut u.f.0.0 };
4471 = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
4572
4673error: not automatically applying `DerefMut` on `ManuallyDrop` union field
47- --> $DIR/union-deref.rs:25 :14
74+ --> $DIR/union-deref.rs:33 :14
4875 |
4976LL | unsafe { u.f.0.0.push(0) };
5077 | ^^^^^
5178 |
5279 = help: writing to this reference calls the destructor for the old value
5380 = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
5481
55- error: aborting due to 6 previous errors
82+ error: not automatically applying `DerefMut` on `ManuallyDrop` union field
83+ --> $DIR/union-deref.rs:36:14
84+ |
85+ LL | unsafe { (&mut u).f.0.0 = Vec::new() };
86+ | ^^^^^^^^^^^^
87+ |
88+ = help: writing to this reference calls the destructor for the old value
89+ = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
90+
91+ error: not automatically applying `DerefMut` on `ManuallyDrop` union field
92+ --> $DIR/union-deref.rs:38:19
93+ |
94+ LL | unsafe { &mut (&mut u).f.0.0 };
95+ | ^^^^^^^^^^^^
96+ |
97+ = help: writing to this reference calls the destructor for the old value
98+ = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
99+
100+ error: not automatically applying `DerefMut` on `ManuallyDrop` union field
101+ --> $DIR/union-deref.rs:40:14
102+ |
103+ LL | unsafe { (&mut u).f.0.0.push(0) };
104+ | ^^^^^^^^^^^^
105+ |
106+ = help: writing to this reference calls the destructor for the old value
107+ = help: add an explicit `*` if that is desired, or call `ptr::write` to not run the destructor
108+
109+ error: aborting due to 12 previous errors
56110
0 commit comments