Skip to content

Commit 340827a

Browse files
drop_in_place docs: remove pseudocode-ish implementation details
1 parent c4d69b7 commit 340827a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

library/core/src/ptr/mod.rs

+1-15
Original file line numberDiff line numberDiff line change
@@ -437,21 +437,7 @@ mod mut_ptr;
437437
///
438438
/// # Safety
439439
///
440-
/// Immediately upon executing, `drop_in_place` takes out a mutable borrow on the
441-
/// pointed-to-value. Effectively, this function is implemented like so:
442-
///
443-
/// ```
444-
/// # struct Foo { x: i32 }
445-
/// unsafe fn drop_in_place(to_drop: *mut Foo) {
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-
/// }
450-
/// }
451-
/// ```
452-
///
453-
/// This implies that the behavior is undefined if any of the following
454-
/// conditions are violated:
440+
/// Behavior is undefined if any of the following conditions are violated:
455441
///
456442
/// * `to_drop` must be [valid] for both reads and writes.
457443
///

0 commit comments

Comments
 (0)