diff --git a/src/libcore/option.rs b/src/libcore/option.rs index ad0491f888cc7..e35c91206b8d4 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -455,6 +455,12 @@ impl Option { /// Applies a function to the contained value (if any), /// or returns the provided default (if not). /// + /// Arguments passed to `map_or` are eagerly evaluated; if you are passing + /// the result of a function call, it is recommended to use [`map_or_else`], + /// which is lazily evaluated. + /// + /// [`map_or_else`]: #method.map_or_else + /// /// # Examples /// /// ``` diff --git a/src/libcore/result.rs b/src/libcore/result.rs index bc70dbd62eb52..809d4bace8e84 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -524,6 +524,12 @@ impl Result { /// Applies a function to the contained value (if any), /// or returns the provided default (if not). /// + /// Arguments passed to `map_or` are eagerly evaluated; if you are passing + /// the result of a function call, it is recommended to use [`map_or_else`], + /// which is lazily evaluated. + /// + /// [`map_or_else`]: #method.map_or_else + /// /// # Examples /// /// ```