Skip to content

Commit ba0b7f0

Browse files
committed
Add track_caller attribute to Result::unwrap_or_else
1 parent c16823d commit ba0b7f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/result.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,7 @@ impl<T, E> Result<T, E> {
14221422
/// assert_eq!(Err("foo").unwrap_or_else(count), 3);
14231423
/// ```
14241424
#[inline]
1425+
#[track_caller]
14251426
#[stable(feature = "rust1", since = "1.0.0")]
14261427
pub fn unwrap_or_else<F: FnOnce(E) -> T>(self, op: F) -> T {
14271428
match self {

0 commit comments

Comments
 (0)