Skip to content

Commit

Permalink
Add #[track_caller] to Option::unwrap_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Oct 16, 2023
1 parent a00c09e commit 0df670f
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 0df670f

Please sign in to comment.