File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -365,9 +365,10 @@ mod prim_unit { }
365
365
/// Working with raw pointers in Rust is uncommon, typically limited to a few patterns.
366
366
/// Raw pointers can be unaligned or [`null`] when unused. However, when a raw pointer is
367
367
/// dereferenced (using the `*` operator), it must be non-null and aligned.
368
+ ///
368
369
/// Storing through a raw pointer using `*ptr = data` calls `drop` on the old value, so
369
- /// [`write`] must be used if memory is not already initialized---otherwise `drop`
370
- /// would be called on the uninitialized memory.
370
+ /// [`write`] must be used if the type has drop glue and memory is not already
371
+ /// initialized---otherwise `drop` would be called on the uninitialized memory.
371
372
///
372
373
/// Use the [`null`] and [`null_mut`] functions to create null pointers, and the
373
374
/// [`is_null`] method of the `*const T` and `*mut T` types to check for null.
You can’t perform that action at this time.
0 commit comments