Rollup merge of #94457 - jhpratt:stabilize-derive_default_enum, r=davidtwco
Stabilize `derive_default_enum` This stabilizes `#![feature(derive_default_enum)]`, as proposed in [RFC 3107](https://github.com/rust-lang/rfcs/pull/3107) and tracked in #87517. In short, it permits you to `#[derive(Default)]` on `enum`s, indicating what the default should be by placing a `#[default]` attribute on the desired variant (which must be a unit variant in the interest of forward compatibility). ```````@rustbot``````` label +S-waiting-on-review +T-lang
This commit is contained in:
commit
27e2d811e6
16 changed files with 55 additions and 73 deletions
|
@ -126,6 +126,8 @@ declare_features! (
|
|||
(accepted, default_type_params, "1.0.0", None, None),
|
||||
/// Allows `#[deprecated]` attribute.
|
||||
(accepted, deprecated, "1.9.0", Some(29935), None),
|
||||
/// Allows `#[derive(Default)]` and `#[default]` on enums.
|
||||
(accepted, derive_default_enum, "1.62.0", Some(86985), None),
|
||||
/// Allows the use of destructuring assignments.
|
||||
(accepted, destructuring_assignment, "1.59.0", Some(71126), None),
|
||||
/// Allows `#[doc(alias = "...")]`.
|
||||
|
|
|
@ -368,8 +368,6 @@ declare_features! (
|
|||
(active, deprecated_safe, "1.61.0", Some(94978), None),
|
||||
/// Allows having using `suggestion` in the `#[deprecated]` attribute.
|
||||
(active, deprecated_suggestion, "1.61.0", Some(94785), None),
|
||||
/// Allows `#[derive(Default)]` and `#[default]` on enums.
|
||||
(active, derive_default_enum, "1.56.0", Some(86985), None),
|
||||
/// Tells rustdoc to automatically generate `#[doc(cfg(...))]`.
|
||||
(active, doc_auto_cfg, "1.58.0", Some(43781), None),
|
||||
/// Allows `#[doc(cfg(...))]`.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
//! even if it is stabilized or removed, *do not remove it*. Instead, move the
|
||||
//! symbol to the `accepted` or `removed` modules respectively.
|
||||
|
||||
#![feature(derive_default_enum)]
|
||||
#![cfg_attr(bootstrap, feature(derive_default_enum))]
|
||||
#![feature(once_cell)]
|
||||
|
||||
mod accepted;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue