@@ -332,7 +332,8 @@ impl<T: Copy> Clone for Cell<T> {
332332}
333333
334334#[ stable( feature = "rust1" , since = "1.0.0" ) ]
335- impl < T : Default > Default for Cell < T > {
335+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
336+ impl < T : ~const Default > const Default for Cell < T > {
336337 /// Creates a `Cell<T>`, with the `Default` value for T.
337338 #[ inline]
338339 fn default ( ) -> Cell < T > {
@@ -1318,7 +1319,8 @@ impl<T: Clone> Clone for RefCell<T> {
13181319}
13191320
13201321#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1321- impl < T : Default > Default for RefCell < T > {
1322+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
1323+ impl < T : ~const Default > const Default for RefCell < T > {
13221324 /// Creates a `RefCell<T>`, with the `Default` value for T.
13231325 #[ inline]
13241326 fn default ( ) -> RefCell < T > {
@@ -2233,7 +2235,8 @@ impl<T: ?Sized> UnsafeCell<T> {
22332235}
22342236
22352237#[ stable( feature = "unsafe_cell_default" , since = "1.10.0" ) ]
2236- impl < T : Default > Default for UnsafeCell < T > {
2238+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2239+ impl < T : ~const Default > const Default for UnsafeCell < T > {
22372240 /// Creates an `UnsafeCell`, with the `Default` value for T.
22382241 fn default ( ) -> UnsafeCell < T > {
22392242 UnsafeCell :: new ( Default :: default ( ) )
@@ -2340,7 +2343,8 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
23402343}
23412344
23422345#[ unstable( feature = "sync_unsafe_cell" , issue = "95439" ) ]
2343- impl < T : Default > Default for SyncUnsafeCell < T > {
2346+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2347+ impl < T : ~const Default > const Default for SyncUnsafeCell < T > {
23442348 /// Creates an `SyncUnsafeCell`, with the `Default` value for T.
23452349 fn default ( ) -> SyncUnsafeCell < T > {
23462350 SyncUnsafeCell :: new ( Default :: default ( ) )
0 commit comments