about summary refs log tree commit diff
path: root/library/core/src/option.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/option.rs')
-rw-r--r--library/core/src/option.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index 9b6ff76b240..1020e655579 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -1125,6 +1125,7 @@ impl<T> Option<T> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[must_use = "if you don't need the returned value, use `if let` instead"]
     pub fn map_or<U, F>(self, default: U, f: F) -> U
     where
         F: FnOnce(T) -> U,