Auto merge of #134628 - estebank:const-default, r=oli-obk · rust-lang/rust@f838cbc (original) (raw)
`@@ -333,7 +333,8 @@ impl<T: Copy> Clone for Cell {
`
333
333
`}
`
334
334
``
335
335
`#[stable(feature = "rust1", since = "1.0.0")]
`
336
``
`-
impl<T: Default> Default for Cell {
`
``
336
`+
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
`
``
337
`+
impl<T: ~const Default> const Default for Cell {
`
337
338
`` /// Creates a Cell<T>, with the Default value for T.
``
338
339
`#[inline]
`
339
340
`fn default() -> Cell {
`
`@@ -1323,7 +1324,8 @@ impl<T: Clone> Clone for RefCell {
`
1323
1324
`}
`
1324
1325
``
1325
1326
`#[stable(feature = "rust1", since = "1.0.0")]
`
1326
``
`-
impl<T: Default> Default for RefCell {
`
``
1327
`+
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
`
``
1328
`+
impl<T: ~const Default> const Default for RefCell {
`
1327
1329
`` /// Creates a RefCell<T>, with the Default value for T.
``
1328
1330
`#[inline]
`
1329
1331
`fn default() -> RefCell {
`
`@@ -2330,7 +2332,8 @@ impl<T: ?Sized> UnsafeCell {
`
2330
2332
`}
`
2331
2333
``
2332
2334
`#[stable(feature = "unsafe_cell_default", since = "1.10.0")]
`
2333
``
`-
impl<T: Default> Default for UnsafeCell {
`
``
2335
`+
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
`
``
2336
`+
impl<T: ~const Default> const Default for UnsafeCell {
`
2334
2337
`` /// Creates an UnsafeCell, with the Default value for T.
``
2335
2338
`fn default() -> UnsafeCell {
`
2336
2339
`UnsafeCell::new(Default::default())
`
`@@ -2434,7 +2437,8 @@ impl<T: ?Sized> SyncUnsafeCell {
`
2434
2437
`}
`
2435
2438
``
2436
2439
`#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
`
2437
``
`-
impl<T: Default> Default for SyncUnsafeCell {
`
``
2440
`+
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
`
``
2441
`+
impl<T: ~const Default> const Default for SyncUnsafeCell {
`
2438
2442
`` /// Creates an SyncUnsafeCell, with the Default value for T.
``
2439
2443
`fn default() -> SyncUnsafeCell {
`
2440
2444
`SyncUnsafeCell::new(Default::default())
`