Skip to content

Commit

Permalink
fix[core]: do not elide lifetime in return type of `OnceCell::get_or_…
Browse files Browse the repository at this point in the history
…try_init`

Co-authored-by: Alex Kladov <[email protected]>
  • Loading branch information
joboet and matklad committed Jul 26, 2023
1 parent 17d056e commit db38c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/cell/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<T> OnceCell<T> {
/// assert_eq!(cell.get(), Some(&92))
/// ```
#[unstable(feature = "once_cell_try", issue = "109737")]
pub fn get_or_try_init<'a, F, R>(&'a self, f: F) -> <R::Residual as Residual<&T>>::TryType
pub fn get_or_try_init<'a, F, R>(&'a self, f: F) -> <R::Residual as Residual<&'a T>>::TryType
where
F: FnOnce() -> R,
R: Try<Output = T>,
Expand Down

0 comments on commit db38c59

Please sign in to comment.