@@ -332,7 +332,8 @@ impl<T: Copy> Clone for Cell<T> {
332
332
}
333
333
334
334
#[ 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 > {
336
337
/// Creates a `Cell<T>`, with the `Default` value for T.
337
338
#[ inline]
338
339
fn default ( ) -> Cell < T > {
@@ -1318,7 +1319,8 @@ impl<T: Clone> Clone for RefCell<T> {
1318
1319
}
1319
1320
1320
1321
#[ 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 > {
1322
1324
/// Creates a `RefCell<T>`, with the `Default` value for T.
1323
1325
#[ inline]
1324
1326
fn default ( ) -> RefCell < T > {
@@ -2316,7 +2318,8 @@ impl<T: ?Sized> UnsafeCell<T> {
2316
2318
}
2317
2319
2318
2320
#[ stable( feature = "unsafe_cell_default" , since = "1.10.0" ) ]
2319
- impl < T : Default > Default for UnsafeCell < T > {
2321
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2322
+ impl < T : ~const Default > const Default for UnsafeCell < T > {
2320
2323
/// Creates an `UnsafeCell`, with the `Default` value for T.
2321
2324
fn default ( ) -> UnsafeCell < T > {
2322
2325
UnsafeCell :: new ( Default :: default ( ) )
@@ -2423,7 +2426,8 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
2423
2426
}
2424
2427
2425
2428
#[ unstable( feature = "sync_unsafe_cell" , issue = "95439" ) ]
2426
- impl < T : Default > Default for SyncUnsafeCell < T > {
2429
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2430
+ impl < T : ~const Default > const Default for SyncUnsafeCell < T > {
2427
2431
/// Creates an `SyncUnsafeCell`, with the `Default` value for T.
2428
2432
fn default ( ) -> SyncUnsafeCell < T > {
2429
2433
SyncUnsafeCell :: new ( Default :: default ( ) )
0 commit comments