about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/option.rs1
-rw-r--r--library/core/src/result.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index 0e5eb03239c..53c9ae498c0 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -1403,6 +1403,7 @@ impl<T> Option<T> {
     #[doc(alias = "flatmap")]
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[rustc_confusables("flat_map", "flatmap")]
     pub fn and_then<U, F>(self, f: F) -> Option<U>
     where
         F: FnOnce(T) -> Option<U>,
diff --git a/library/core/src/result.rs b/library/core/src/result.rs
index 80f7fe75e82..6879ac03f70 100644
--- a/library/core/src/result.rs
+++ b/library/core/src/result.rs
@@ -1315,6 +1315,7 @@ impl<T, E> Result<T, E> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[rustc_confusables("flat_map", "flatmap")]
     pub fn and_then<U, F: FnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E> {
         match self {
             Ok(t) => op(t),