Add OnceCell<T>: !Sync impl for diagnostics

This commit is contained in:
Nilstrieb 2023-01-16 18:50:45 +01:00
parent 19423b5944
commit e1f630f23d

View File

@ -298,3 +298,7 @@ impl<T> const From<T> for OnceCell<T> {
OnceCell { inner: UnsafeCell::new(Some(value)) }
}
}
// Just like for `Cell<T>` this isn't needed, but results in nicer error messages.
#[unstable(feature = "once_cell", issue = "74465")]
impl<T> !Sync for OnceCell<T> {}