diff options
| author | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2023-05-21 11:34:01 -0400 |
|---|---|---|
| committer | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2023-05-21 11:34:01 -0400 |
| commit | 340827af9bcc140cbf3273a4a7f7b2628584f7a1 (patch) | |
| tree | 44b5be3158a5377ae1a9c18a87557da6927f1258 | |
| parent | c4d69b717f7dc6a469a65a1194ccdba2a833fefc (diff) | |
| download | rust-340827af9bcc140cbf3273a4a7f7b2628584f7a1.tar.gz rust-340827af9bcc140cbf3273a4a7f7b2628584f7a1.zip | |
drop_in_place docs: remove pseudocode-ish implementation details
| -rw-r--r-- | library/core/src/ptr/mod.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 1a5519b9307..ff9fa48f311 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -437,21 +437,7 @@ mod mut_ptr; /// /// # Safety /// -/// Immediately upon executing, `drop_in_place` takes out a mutable borrow on the -/// pointed-to-value. Effectively, this function is implemented like so: -/// -/// ``` -/// # struct Foo { x: i32 } -/// unsafe fn drop_in_place(to_drop: *mut Foo) { -/// drop_in_place_inner(&mut *to_drop); -/// unsafe fn drop_in_place_inner(to_drop: &mut Foo) { -/// // ... drop the fields of `value` ... -/// } -/// } -/// ``` -/// -/// This implies that the behavior is undefined if any of the following -/// conditions are violated: +/// Behavior is undefined if any of the following conditions are violated: /// /// * `to_drop` must be [valid] for both reads and writes. /// |
