diff --git a/library/core/src/option.rs b/library/core/src/option.rs index bca73cb770fb..934175863630 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1189,6 +1189,12 @@ impl Option { /// Returns [`None`] if the option is [`None`], otherwise returns `optb`. /// + /// Arguments passed to `and` are eagerly evaluated; if you are passing the + /// result of a function call, it is recommended to use [`and_then`], which is + /// lazily evaluated. + /// + /// [`and_then`]: Option::and_then + /// /// # Examples /// /// ``` diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 45b052c824d3..75dcb4cdba9e 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1285,6 +1285,11 @@ impl Result { /// Returns `res` if the result is [`Ok`], otherwise returns the [`Err`] value of `self`. /// + /// Arguments passed to `and` are eagerly evaluated; if you are passing the + /// result of a function call, it is recommended to use [`and_then`], which is + /// lazily evaluated. + /// + /// [`and_then`]: Result::and_then /// /// # Examples ///