]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/lazy.rs
Rollup merge of #96129 - mattheww:2022-04_float_rounding, r=Dylan-DPC
[rust.git] / library / std / src / lazy.rs
index 132733a0525106034097eb4889776bdc2b5cf29a..d7450962359df78e42e636aeab324071a85c16b3 100644 (file)
@@ -86,7 +86,8 @@ impl<T: RefUnwindSafe + UnwindSafe> RefUnwindSafe for SyncOnceCell<T> {}
 impl<T: UnwindSafe> UnwindSafe for SyncOnceCell<T> {}
 
 #[unstable(feature = "once_cell", issue = "74465")]
-impl<T> Default for SyncOnceCell<T> {
+#[rustc_const_unstable(feature = "const_default_impls", issue = "87864")]
+impl<T> const Default for SyncOnceCell<T> {
     /// Creates a new empty cell.
     ///
     /// # Example
@@ -170,6 +171,7 @@ impl<T: Eq> Eq for SyncOnceCell<T> {}
 impl<T> SyncOnceCell<T> {
     /// Creates a new empty cell.
     #[unstable(feature = "once_cell", issue = "74465")]
+    #[must_use]
     pub const fn new() -> SyncOnceCell<T> {
         SyncOnceCell {
             once: Once::new(),