Skip to content

Commit 6eb68c3

Browse files
authored
Update maintaining-std.md
1 parent 9873568 commit 6eb68c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libs/maintaining-std.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Any value behind a `&mut` reference can be replaced with a new one using `mem::r
169169

170170
#### `mem::forget`
171171

172-
Rust doesn't guarantee destructors will run when a value is leaked (which can be done with `mem::forget`), so code should avoid relying on them for maintaining safety. Remember, [everybody poops][Everybody Poops].
172+
Rust doesn't guarantee destructors will run when a value is leaked (which can be done with `mem::forget`), so code should avoid relying on them for maintaining safety. Remember, [everyone poops][Everyone Poops].
173173

174174
It's ok not to run a destructor when a value is leaked because its storage isn't deallocated or repurposed. It's generally _not_ ok not to run a destructor before deallocating or repurposing already initialized storage because [memory may be pinned][Drop guarantee]. Having said that, there can be exceptions for skipping destructors if you can guarantee there's never pinning involved.
175175

0 commit comments

Comments
 (0)