We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
OnceCell<T>: !Sync
1 parent 19423b5 commit e1f630fCopy full SHA for e1f630f
library/core/src/cell/once.rs
@@ -298,3 +298,7 @@ impl<T> const From<T> for OnceCell<T> {
298
OnceCell { inner: UnsafeCell::new(Some(value)) }
299
}
300
301
+
302
+// Just like for `Cell<T>` this isn't needed, but results in nicer error messages.
303
+#[unstable(feature = "once_cell", issue = "74465")]
304
+impl<T> !Sync for OnceCell<T> {}
0 commit comments