Skip to content

Commit f1a8b53

Browse files
authored
Apply suggestion
1 parent 352c440 commit f1a8b53

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/destructors.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,8 @@ let x = (&temp()).use_temp(); // ERROR
349349
and [`std::mem::ManuallyDrop`] provides a wrapper to prevent a
350350
variable or field from being dropped automatically.
351351

352-
> Note: Preventing a destructor from being run via `forget` or other means is safe in Rust
353-
> even if it has a type that isn't `'static`. This means that publicly exposed APIs cannot
354-
> rely on destructor being run for soundness.
352+
> Note: 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`.
353+
> 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.
355354
356355
[Assignment]: expressions/operator-expr.md#assignment-expressions
357356
[binding modes]: patterns.md#binding-modes

0 commit comments

Comments
 (0)