@@ -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 > {
@@ -2233,7 +2235,8 @@ impl<T: ?Sized> UnsafeCell<T> {
2233
2235
}
2234
2236
2235
2237
#[ 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 > {
2237
2240
/// Creates an `UnsafeCell`, with the `Default` value for T.
2238
2241
fn default ( ) -> UnsafeCell < T > {
2239
2242
UnsafeCell :: new ( Default :: default ( ) )
@@ -2340,7 +2343,8 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
2340
2343
}
2341
2344
2342
2345
#[ 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 > {
2344
2348
/// Creates an `SyncUnsafeCell`, with the `Default` value for T.
2345
2349
fn default ( ) -> SyncUnsafeCell < T > {
2346
2350
SyncUnsafeCell :: new ( Default :: default ( ) )
0 commit comments