Skip to content

Commit b9674db

Browse files
committed
Nits
1 parent 9f0172f commit b9674db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

text/0000-manually-drop.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ annotate the dependencies somehow.
4646
# Detailed design
4747
[design]: #detailed-design
4848

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`)
5050
module. `mem` module is a most suitable place for such `struct`, as the module already a place for
5151
functions very similar in purpose: `drop` and `forget`.
5252

5353
```rust
5454
/// Inhibits compiler from automatically calling `T`’s destructor.
5555
#[unstable(feature = "manually_drop", reason = "recently added", issue = "0")]
56-
#[allow(missing_debug_implementations, unions_with_drop_fields)]
56+
#[allow(unions_with_drop_fields)]
5757
pub union ManuallyDrop<T>{ value: T }
5858

5959
impl<T> ManuallyDrop<T> {
@@ -101,6 +101,8 @@ impl<T> ManuallyDrop<T> {
101101
ptr::drop_in_place(&mut self.value)
102102
}
103103
}
104+
105+
// Other common impls such as `Debug for T: Debug`.
104106
```
105107

106108
Let us apply this structure to the example from the motivation:

0 commit comments

Comments
 (0)