Skip to content

Commit bf2c019

Browse files
committed
note that unsized &mut refs cannot be swapped
1 parent cfd431b commit bf2c019

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)