Skip to content

Commit

Permalink
Unrolled build for #116795
Browse files Browse the repository at this point in the history
Rollup merge of #116795 - DaniPopes:track-caller-option, r=cuviper

Add `#[track_caller]` to `Option::unwrap_or_else`

Same as #116317 but for `Option`.

Closes #115302
  • Loading branch information
rust-timer authored Oct 19, 2023
2 parents 020d008 + 0df670f commit 2085e5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ impl<T> Option<T> {
/// assert_eq!(None.unwrap_or_else(|| 2 * k), 20);
/// ```
#[inline]
#[track_caller]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn unwrap_or_else<F>(self, f: F) -> T
where
Expand Down

0 comments on commit 2085e5d

Please sign in to comment.