File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,14 @@ annotate the dependencies somehow.
46
46
# Detailed design
47
47
[ design ] : #detailed-design
48
48
49
- This RFC proposes adding following ` struct ` to the ` core::mem ` (and by extension the ` std::mem ` )
49
+ This RFC proposes adding following ` union ` to the ` core::mem ` (and by extension the ` std::mem ` )
50
50
module. ` mem ` module is a most suitable place for such ` struct ` , as the module already a place for
51
51
functions very similar in purpose: ` drop ` and ` forget ` .
52
52
53
53
``` rust
54
54
/// Inhibits compiler from automatically calling `T`’s destructor.
55
55
#[unstable(feature = " manually_drop" , reason = " recently added" , issue = " 0" )]
56
- #[allow(missing_debug_implementations, unions_with_drop_fields)]
56
+ #[allow(unions_with_drop_fields)]
57
57
pub union ManuallyDrop <T >{ value : T }
58
58
59
59
impl <T > ManuallyDrop <T > {
@@ -101,6 +101,8 @@ impl<T> ManuallyDrop<T> {
101
101
ptr :: drop_in_place (& mut self . value)
102
102
}
103
103
}
104
+
105
+ // Other common impls such as `Debug for T: Debug`.
104
106
```
105
107
106
108
Let us apply this structure to the example from the motivation:
You can’t perform that action at this time.
0 commit comments