Add #[track_caller]
to Option::unwrap_or_else
This commit is contained in:
parent
a00c09e9d8
commit
0df670fb67
1 changed files with 1 additions and 0 deletions
|
@ -959,6 +959,7 @@ impl<T> Option<T> {
|
||||||
/// assert_eq!(None.unwrap_or_else(|| 2 * k), 20);
|
/// assert_eq!(None.unwrap_or_else(|| 2 * k), 20);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[track_caller]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn unwrap_or_else<F>(self, f: F) -> T
|
pub fn unwrap_or_else<F>(self, f: F) -> T
|
||||||
where
|
where
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue