You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/destructors.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -349,9 +349,8 @@ let x = (&temp()).use_temp(); // ERROR
349
349
and [`std::mem::ManuallyDrop`] provides a wrapper to prevent a
350
350
variable or field from being dropped automatically.
351
351
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.
0 commit comments