@@ -338,6 +338,12 @@ impl<T> Option<T> {
338338
339339 /// Returns the contained value or a default.
340340 ///
341+ /// Arguments passed to `unwrap_or` are eagerly evaluated; if you are passing
342+ /// the result of a function call, it is recommended to use [`unwrap_or_else`],
343+ /// which is lazily evaluated.
344+ ///
345+ /// [`unwrap_or_else`]: #method.unwrap_or_else
346+ ///
341347 /// # Examples
342348 ///
343349 /// ```
@@ -451,11 +457,16 @@ impl<T> Option<T> {
451457 /// Transforms the `Option<T>` into a [`Result<T, E>`], mapping [`Some(v)`] to
452458 /// [`Ok(v)`] and [`None`] to [`Err(err)`].
453459 ///
460+ /// Arguments passed to `ok_or` are eagerly evaluated; if you are passing the
461+ /// result of a function call, it is recommended to use [`ok_or_else`], which is
462+ /// lazily evaluated.
463+ ///
454464 /// [`Result<T, E>`]: ../../std/result/enum.Result.html
455465 /// [`Ok(v)`]: ../../std/result/enum.Result.html#variant.Ok
456466 /// [`Err(err)`]: ../../std/result/enum.Result.html#variant.Err
457467 /// [`None`]: #variant.None
458468 /// [`Some(v)`]: #variant.Some
469+ /// [`ok_or_else`]: #method.ok_or_else
459470 ///
460471 /// # Examples
461472 ///
@@ -644,6 +655,12 @@ impl<T> Option<T> {
644655
645656 /// Returns the option if it contains a value, otherwise returns `optb`.
646657 ///
658+ /// Arguments passed to `or` are eagerly evaluated; if you are passing the
659+ /// result of a function call, it is recommended to use [`or_else`], which is
660+ /// lazily evaluated.
661+ ///
662+ /// [`or_else`]: #method.or_else
663+ ///
647664 /// # Examples
648665 ///
649666 /// ```
0 commit comments