diff options
| author | Kevin Reid <kpreid@google.com> | 2021-09-04 11:05:36 -0700 |
|---|---|---|
| committer | Kevin Reid <kpreid@google.com> | 2021-09-04 11:29:55 -0700 |
| commit | 34c1fce50be88eb4a0b81eb486b47e1f929b1ce3 (patch) | |
| tree | 5f31a91641ae25d5dbf11c61cf8635887b711d34 | |
| parent | 226e181b80fa0be755872b66916ef7e704601ec2 (diff) | |
| download | rust-34c1fce50be88eb4a0b81eb486b47e1f929b1ce3.tar.gz rust-34c1fce50be88eb4a0b81eb486b47e1f929b1ce3.zip | |
“Moves” instead of “copies” in `<Option<T> as From<T>>::from` doc.
This implementation has no `Copy` or `Clone` bound, so its operation is guaranteed to be a move. The call site might copy, but the function itself cannot. Also linkify `Some` while we're touching the line anyway.
| -rw-r--r-- | library/core/src/option.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 9d5e03dd0de..899a3b83df6 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1701,7 +1701,7 @@ impl<'a, T> IntoIterator for &'a mut Option<T> { #[stable(since = "1.12.0", feature = "option_from")] impl<T> From<T> for Option<T> { - /// Copies `val` into a new `Some`. + /// Moves `val` into a new [`Some`]. /// /// # Examples /// |
