about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTaylor Yu <tlyu@mit.edu>2021-06-10 22:27:27 -0500
committerTaylor Yu <tlyu@mit.edu>2021-06-10 22:30:00 -0500
commit4763377a96691997e03e27f7b292e7dcd5e7a53d (patch)
treed82fb2c2f1c7789262e7412c62d2cae86b8a63cf
parentcb65b48c06406efd21c96372fff2840c957c8798 (diff)
downloadrust-4763377a96691997e03e27f7b292e7dcd5e7a53d.tar.gz
rust-4763377a96691997e03e27f7b292e7dcd5e7a53d.zip
fix typo in option doc
Fix a typo/missed replacement in the documentation for
`impl From<&Option<T>> for Option<&T>` in `core::option`.
-rw-r--r--library/core/src/option.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index 0dd182203df..aedfe88f688 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -1350,7 +1350,7 @@ impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
     ///
     /// Converts an `Option<`[`String`]`>` into an `Option<`[`usize`]`>`, preserving the original.
     /// The [`map`] method takes the `self` argument by value, consuming the original,
-    /// so this technique uses `as_ref` to first take an `Option` to a reference
+    /// so this technique uses `from` to first take an `Option` to a reference
     /// to the value inside the original.
     ///
     /// [`map`]: Option::map