From ba0b7f0f0105f497cd8c6ddffef0c425473fdbb8 Mon Sep 17 00:00:00 2001 From: ravenclaw900 <50060110+ravenclaw900@users.noreply.github.com> Date: Sun, 1 Oct 2023 09:42:37 -0500 Subject: [PATCH] Add track_caller attribute to Result::unwrap_or_else --- library/core/src/result.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/result.rs b/library/core/src/result.rs index 6981abc9be19d..50127b27f8bfc 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -1422,6 +1422,7 @@ impl Result { /// assert_eq!(Err("foo").unwrap_or_else(count), 3); /// ``` #[inline] + #[track_caller] #[stable(feature = "rust1", since = "1.0.0")] pub fn unwrap_or_else T>(self, op: F) -> T { match self {