Skip to content

Commit d51ea53

Browse files
committed
Added feature gate for RFC 2008.
1 parent 59d4845 commit d51ea53

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ declare_features! (
386386
// allow '|' at beginning of match arms (RFC 1925)
387387
(active, match_beginning_vert, "1.21.0", Some(44101)),
388388

389+
// Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008)
390+
(active, non_exhaustive, "1.22.0", Some(44109)),
391+
389392
// Copy/Clone closures (RFC 2132)
390393
(active, clone_closures, "1.22.0", Some(44490)),
391394
(active, copy_closures, "1.22.0", Some(44490)),
@@ -614,6 +617,12 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
614617
not yet settled",
615618
cfg_fn!(structural_match))),
616619

620+
// RFC #2008
621+
("non_exhaustive", Whitelisted, Gated(Stability::Unstable,
622+
"non_exhaustive",
623+
"non exhaustive is an experimental feature",
624+
cfg_fn!(non_exhaustive))),
625+
617626
("plugin", CrateLevel, Gated(Stability::Unstable,
618627
"plugin",
619628
"compiler plugins are experimental \

0 commit comments

Comments
 (0)