Skip to content

Commit 0df670f

Browse files
committed
Add #[track_caller] to Option::unwrap_or_else
1 parent a00c09e commit 0df670f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/option.rs

+1
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,7 @@ impl<T> Option<T> {
959959
/// assert_eq!(None.unwrap_or_else(|| 2 * k), 20);
960960
/// ```
961961
#[inline]
962+
#[track_caller]
962963
#[stable(feature = "rust1", since = "1.0.0")]
963964
pub fn unwrap_or_else<F>(self, f: F) -> T
964965
where

0 commit comments

Comments
 (0)