about summary refs log tree commit diff
path: root/compiler/rustc_feature/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-07-28 05:59:30 +0000
committerbors <bors@rust-lang.org>2021-07-28 05:59:30 +0000
commitaea2e446f09b923d513013743b37b43fca7282dc (patch)
treeac53a52123dd478795393e478e43608b98871609 /compiler/rustc_feature/src
parent8b50cc9a2c408caef30a1cf950c948509b2f648e (diff)
parent72465b0a32e689cd6a61120479c13b38281108a7 (diff)
downloadrust-aea2e446f09b923d513013743b37b43fca7282dc.tar.gz
rust-aea2e446f09b923d513013743b37b43fca7282dc.zip
Auto merge of #86735 - jhpratt:rfc-3107, r=petrochenkov
Implement RFC 3107: `#[derive(Default)]` on enums with a `#[default]` attribute

This PR implements RFC 3107, which permits `#[derive(Default)]` on enums where a unit variant has a `#[default]` attribute. See comments for current status.
Diffstat (limited to 'compiler/rustc_feature/src')
-rw-r--r--compiler/rustc_feature/src/active.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index 8ab61a5d200..3cb1dd17038 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -677,6 +677,9 @@ declare_features! (
     /// Infer generic args for both consts and types.
     (active, generic_arg_infer, "1.55.0", Some(85077), None),
 
+    /// Allows `#[derive(Default)]` and `#[default]` on enums.
+    (active, derive_default_enum, "1.56.0", Some(86985), None),
+
     // -------------------------------------------------------------------------
     // feature-group-end: actual feature gates
     // -------------------------------------------------------------------------