File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -443,8 +443,10 @@ mod mut_ptr;
443443/// ```
444444/// # struct Foo { x: i32 }
445445/// unsafe fn drop_in_place(to_drop: *mut Foo) {
446- /// let mut value = &mut *to_drop;
447- /// // ... drop the fields of `value` ...
446+ /// drop_in_place_inner(&mut *to_drop);
447+ /// unsafe fn drop_in_place_inner(to_drop: &mut Foo) {
448+ /// // ... drop the fields of `value` ...
449+ /// }
448450/// }
449451/// ```
450452///
@@ -453,9 +455,9 @@ mod mut_ptr;
453455///
454456/// * `to_drop` must be [valid] for both reads and writes.
455457///
456- /// * `to_drop` must be properly aligned, even if T has size 0.
458+ /// * `to_drop` must be properly aligned, even if `T` has size 0.
457459///
458- /// * `to_drop` must be nonnull, even if T has size 0.
460+ /// * `to_drop` must be nonnull, even if `T` has size 0.
459461///
460462/// * The value `to_drop` points to must be valid for dropping, which may mean
461463/// it must uphold additional invariants. These invariants depend on the type
You can’t perform that action at this time.
0 commit comments