File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ use crate::ptr;
4
4
/// A wrapper to inhibit compiler from automatically calling `T`’s destructor.
5
5
/// This wrapper is 0-cost.
6
6
///
7
- /// `ManuallyDrop<T>` is guaranteed to have the same layout as `T`, and is subject
8
- /// to the same layout optimizations as `T`. As a consequence, it has *no effect*
9
- /// on the assumptions that the compiler makes about its contents. For example,
10
- /// initializing a `ManuallyDrop<&mut T>` with [`mem::zeroed`] is undefined
11
- /// behavior. If you need to handle uninitialized data, use [`MaybeUninit<T>`]
12
- /// instead.
7
+ /// `ManuallyDrop<T>` is guaranteed to have the same layout and bit validity as
8
+ /// `T`, and is subject to the same layout optimizations as `T`. As a consequence,
9
+ /// it has *no effect* on the assumptions that the compiler makes about its
10
+ /// contents. For example, initializing a `ManuallyDrop<&mut T>` with [`mem::zeroed`]
11
+ /// is undefined behavior. If you need to handle uninitialized data, use
12
+ /// [`MaybeUninit<T>`] instead.
13
13
///
14
14
/// Note that accessing the value inside a `ManuallyDrop<T>` is safe.
15
15
/// This means that a `ManuallyDrop<T>` whose content has been dropped must not
You can’t perform that action at this time.
0 commit comments