Fix RefUnwindSafe & UnwinsSafe impls for lazy::SyncLazy
The logic here is the same as for Send&Sync impls.
This commit is contained in:
parent
1454bbd4fd
commit
ed1439cea4
1 changed files with 3 additions and 1 deletions
|
@ -451,7 +451,9 @@ unsafe impl<T, F: Send> Sync for SyncLazy<T, F> where SyncOnceCell<T>: Sync {}
|
||||||
// auto-derived `Send` impl is OK.
|
// auto-derived `Send` impl is OK.
|
||||||
|
|
||||||
#[unstable(feature = "once_cell", issue = "74465")]
|
#[unstable(feature = "once_cell", issue = "74465")]
|
||||||
impl<T, F: RefUnwindSafe> RefUnwindSafe for SyncLazy<T, F> where SyncOnceCell<T>: RefUnwindSafe {}
|
impl<T, F: UnwindSafe> RefUnwindSafe for SyncLazy<T, F> where SyncOnceCell<T>: RefUnwindSafe {}
|
||||||
|
#[unstable(feature = "once_cell", issue = "74465")]
|
||||||
|
impl<T, F: UnwindSafe> UnwindSafe for SyncLazy<T, F> where SyncOnceCell<T>: UnwindSafe {}
|
||||||
|
|
||||||
impl<T, F> SyncLazy<T, F> {
|
impl<T, F> SyncLazy<T, F> {
|
||||||
/// Creates a new lazy value with the given initializing
|
/// Creates a new lazy value with the given initializing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue