@@ -333,7 +333,8 @@ impl<T: Copy> Clone for Cell<T> {
333
333
}
334
334
335
335
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
336
- impl < T : Default > Default for Cell < T > {
336
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
337
+ impl < T : ~const Default > const Default for Cell < T > {
337
338
/// Creates a `Cell<T>`, with the `Default` value for T.
338
339
#[ inline]
339
340
fn default ( ) -> Cell < T > {
@@ -1326,7 +1327,8 @@ impl<T: Clone> Clone for RefCell<T> {
1326
1327
}
1327
1328
1328
1329
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1329
- impl < T : Default > Default for RefCell < T > {
1330
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
1331
+ impl < T : ~const Default > const Default for RefCell < T > {
1330
1332
/// Creates a `RefCell<T>`, with the `Default` value for T.
1331
1333
#[ inline]
1332
1334
fn default ( ) -> RefCell < T > {
@@ -2333,7 +2335,8 @@ impl<T: ?Sized> UnsafeCell<T> {
2333
2335
}
2334
2336
2335
2337
#[ stable( feature = "unsafe_cell_default" , since = "1.10.0" ) ]
2336
- impl < T : Default > Default for UnsafeCell < T > {
2338
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2339
+ impl < T : ~const Default > const Default for UnsafeCell < T > {
2337
2340
/// Creates an `UnsafeCell`, with the `Default` value for T.
2338
2341
fn default ( ) -> UnsafeCell < T > {
2339
2342
UnsafeCell :: new ( Default :: default ( ) )
@@ -2440,7 +2443,8 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
2440
2443
}
2441
2444
2442
2445
#[ unstable( feature = "sync_unsafe_cell" , issue = "95439" ) ]
2443
- impl < T : Default > Default for SyncUnsafeCell < T > {
2446
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2447
+ impl < T : ~const Default > const Default for SyncUnsafeCell < T > {
2444
2448
/// Creates an `SyncUnsafeCell`, with the `Default` value for T.
2445
2449
fn default ( ) -> SyncUnsafeCell < T > {
2446
2450
SyncUnsafeCell :: new ( Default :: default ( ) )
0 commit comments