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;
443
443
/// ```
444
444
/// # struct Foo { x: i32 }
445
445
/// 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
+ /// }
448
450
/// }
449
451
/// ```
450
452
///
@@ -453,9 +455,9 @@ mod mut_ptr;
453
455
///
454
456
/// * `to_drop` must be [valid] for both reads and writes.
455
457
///
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.
457
459
///
458
- /// * `to_drop` must be nonnull, even if T has size 0.
460
+ /// * `to_drop` must be nonnull, even if `T` has size 0.
459
461
///
460
462
/// * The value `to_drop` points to must be valid for dropping, which may mean
461
463
/// it must uphold additional invariants. These invariants depend on the type
You can’t perform that action at this time.
0 commit comments