Skip to content

Commit db38c59

Browse files
joboetmatklad
andcommitted
fix[core]: do not elide lifetime in return type of OnceCell::get_or_try_init
Co-authored-by: Alex Kladov <[email protected]>
1 parent 17d056e commit db38c59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/cell/once.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<T> OnceCell<T> {
171171
/// assert_eq!(cell.get(), Some(&92))
172172
/// ```
173173
#[unstable(feature = "once_cell_try", issue = "109737")]
174-
pub fn get_or_try_init<'a, F, R>(&'a self, f: F) -> <R::Residual as Residual<&T>>::TryType
174+
pub fn get_or_try_init<'a, F, R>(&'a self, f: F) -> <R::Residual as Residual<&'a T>>::TryType
175175
where
176176
F: FnOnce() -> R,
177177
R: Try<Output = T>,

0 commit comments

Comments
 (0)