@@ -333,7 +333,8 @@ impl<T: Copy> Clone for Cell<T> {
333333}
334334
335335#[ 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 > {
337338 /// Creates a `Cell<T>`, with the `Default` value for T.
338339 #[ inline]
339340 fn default ( ) -> Cell < T > {
@@ -1326,7 +1327,8 @@ impl<T: Clone> Clone for RefCell<T> {
13261327}
13271328
13281329#[ 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 > {
13301332 /// Creates a `RefCell<T>`, with the `Default` value for T.
13311333 #[ inline]
13321334 fn default ( ) -> RefCell < T > {
@@ -2333,7 +2335,8 @@ impl<T: ?Sized> UnsafeCell<T> {
23332335}
23342336
23352337#[ 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 > {
23372340 /// Creates an `UnsafeCell`, with the `Default` value for T.
23382341 fn default ( ) -> UnsafeCell < T > {
23392342 UnsafeCell :: new ( Default :: default ( ) )
@@ -2440,7 +2443,8 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
24402443}
24412444
24422445#[ 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 > {
24442448 /// Creates an `SyncUnsafeCell`, with the `Default` value for T.
24452449 fn default ( ) -> SyncUnsafeCell < T > {
24462450 SyncUnsafeCell :: new ( Default :: default ( ) )
0 commit comments