Skip to content

Commit d896ebf

Browse files
committed
Reword the title of this section
This is intended since there are multiple ways to suppress a destructor.
1 parent 6dd3a2d commit d896ebf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/destructors.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,9 @@ let x = (&temp()).use_temp(); // ERROR
426426
r[destructors.forget]
427427
## Not running destructors
428428

429-
### `forget`
429+
### Manually preventing destructors
430430

431+
r[destructors.manually-preventing]
431432
[`std::mem::forget`] can be used to prevent the destructor of a variable from being run,
432433
and [`std::mem::ManuallyDrop`] provides a wrapper to prevent a
433434
variable or field from being dropped automatically.

0 commit comments

Comments
 (0)