Skip to content

Commit 08c972e

Browse files
authored
Merge pull request #2006 from tshepang/patch-1
destructors.md: point to core:: instead of std::
2 parents b88ca95 + 68165a9 commit 08c972e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/destructors.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dropped.
1111
r[destructors.operation]
1212
The destructor of a type `T` consists of:
1313

14-
1. If `T: Drop`, calling [`<T as std::ops::Drop>::drop`](std::ops::Drop::drop)
14+
1. If `T: Drop`, calling [`<T as core::ops::Drop>::drop`](core::ops::Drop::drop)
1515
2. Recursively running the destructor of all of its fields.
1616
* The fields of a [struct] are dropped in declaration order.
1717
* The fields of the active [enum variant] are dropped in declaration order.
@@ -25,7 +25,7 @@ The destructor of a type `T` consists of:
2525

2626
r[destructors.drop_in_place]
2727
If a destructor must be run manually, such as when implementing your own smart
28-
pointer, [`std::ptr::drop_in_place`] can be used.
28+
pointer, [`core::ptr::drop_in_place`] can be used.
2929

3030
Some examples:
3131

@@ -626,12 +626,12 @@ r[destructors.forget]
626626
r[destructors.manually-suppressing]
627627
### Manually suppressing destructors
628628

629-
[`std::mem::forget`] can be used to prevent the destructor of a variable from being run,
630-
and [`std::mem::ManuallyDrop`] provides a wrapper to prevent a
629+
[`core::mem::forget`] can be used to prevent the destructor of a variable from being run,
630+
and [`core::mem::ManuallyDrop`] provides a wrapper to prevent a
631631
variable or field from being dropped automatically.
632632

633633
> [!NOTE]
634-
> Preventing a destructor from being run via [`std::mem::forget`] or other means is safe even if it has a type that isn't `'static`. Besides the places where destructors are guaranteed to run as defined by this document, types may *not* safely rely on a destructor being run for soundness.
634+
> Preventing a destructor from being run via [`core::mem::forget`] or other means is safe even if it has a type that isn't `'static`. Besides the places where destructors are guaranteed to run as defined by this document, types may *not* safely rely on a destructor being run for soundness.
635635
636636
r[destructors.process-termination]
637637
### Process termination without unwinding

0 commit comments

Comments
 (0)