Skip to content

Commit 49b56b0

Browse files
authored
Merge pull request #757 from lolbinarycat/mem_swap_unsized
note that unsized &mut refs cannot be swapped
2 parents 27b7a2b + bf2c019 commit 49b56b0

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
@@ -277,7 +277,7 @@ struct OptionCell<T> {
277277

278278
#### `mem::replace` and `mem::swap`
279279

280-
Any value behind a `&mut` reference can be replaced with a new one using `mem::replace` or `mem::swap`, so code shouldn't assume any reachable mutable references can't have their internals changed by replacing.
280+
Any `Sized` value behind a `&mut` reference can be replaced with a new one using `mem::replace` or `mem::swap`, so code shouldn't assume any reachable mutable references can't have their internals changed by replacing.
281281

282282
#### `mem::forget`
283283

0 commit comments

Comments
 (0)