@@ -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 > {
@@ -1307,7 +1308,8 @@ impl<T: Clone> Clone for RefCell<T> {
1307
1308
}
1308
1309
1309
1310
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1310
- impl < T : Default > Default for RefCell < T > {
1311
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
1312
+ impl < T : ~const Default > const Default for RefCell < T > {
1311
1313
/// Creates a `RefCell<T>`, with the `Default` value for T.
1312
1314
#[ inline]
1313
1315
fn default ( ) -> RefCell < T > {
@@ -2305,7 +2307,8 @@ impl<T: ?Sized> UnsafeCell<T> {
2305
2307
}
2306
2308
2307
2309
#[ stable( feature = "unsafe_cell_default" , since = "1.10.0" ) ]
2308
- impl < T : Default > Default for UnsafeCell < T > {
2310
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2311
+ impl < T : ~const Default > const Default for UnsafeCell < T > {
2309
2312
/// Creates an `UnsafeCell`, with the `Default` value for T.
2310
2313
fn default ( ) -> UnsafeCell < T > {
2311
2314
UnsafeCell :: new ( Default :: default ( ) )
@@ -2412,7 +2415,8 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
2412
2415
}
2413
2416
2414
2417
#[ unstable( feature = "sync_unsafe_cell" , issue = "95439" ) ]
2415
- impl < T : Default > Default for SyncUnsafeCell < T > {
2418
+ #[ rustc_const_unstable( feature = "const_default" , issue = "none" ) ]
2419
+ impl < T : ~const Default > const Default for SyncUnsafeCell < T > {
2416
2420
/// Creates an `SyncUnsafeCell`, with the `Default` value for T.
2417
2421
fn default ( ) -> SyncUnsafeCell < T > {
2418
2422
SyncUnsafeCell :: new ( Default :: default ( ) )
0 commit comments