Skip to content

Commit 2085e5d

Browse files
authored
Unrolled build for rust-lang#116795
Rollup merge of rust-lang#116795 - DaniPopes:track-caller-option, r=cuviper Add `#[track_caller]` to `Option::unwrap_or_else` Same as rust-lang#116317 but for `Option`. Closes rust-lang#115302
2 parents 020d008 + 0df670f commit 2085e5d

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)