diff options
| author | kennytm <kennytm@gmail.com> | 2018-02-04 23:28:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-04 23:28:58 +0800 |
| commit | 1439c2ac35e2e2b03fdc336dc108865387565bd7 (patch) | |
| tree | aeae94e33bf1d93b052337495c5066416ac4bb29 /src/libsyntax/feature_gate.rs | |
| parent | 8b8c6ee79613037e3a7886d1b80c34fcc538511b (diff) | |
| parent | a99b5db56a36652185a91be630b3e2af8ea09360 (diff) | |
| download | rust-1439c2ac35e2e2b03fdc336dc108865387565bd7.tar.gz rust-1439c2ac35e2e2b03fdc336dc108865387565bd7.zip | |
Rollup merge of #47947 - goodmanjonathan:stabilize_match_beginning_vert, r=petrochenkov
Stabilize feature(match_beginning_vert) With this feature stabilized, match expressions can optionally have a `|` at the beginning of each arm. Reference PR: rust-lang-nursery/reference#231 Closes #44101
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 3e523fca92a..3e858c3b923 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -386,9 +386,6 @@ declare_features! ( // allow `#[must_use]` on functions and comparison operators (RFC 1940) (active, fn_must_use, "1.21.0", Some(43302)), - // allow '|' at beginning of match arms (RFC 1925) - (active, match_beginning_vert, "1.21.0", Some(44101)), - // Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008) (active, non_exhaustive, "1.22.0", Some(44109)), @@ -545,6 +542,8 @@ declare_features! ( (accepted, abi_sysv64, "1.24.0", Some(36167)), // Allows `repr(align(16))` struct attribute (RFC 1358) (accepted, repr_align, "1.24.0", Some(33626)), + // allow '|' at beginning of match arms (RFC 1925) + (accepted, match_beginning_vert, "1.25.0", Some(44101)), ); // If you change this, please modify src/doc/unstable-book as well. You must @@ -1683,11 +1682,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } fn visit_arm(&mut self, arm: &'a ast::Arm) { - if let Some(span) = arm.beginning_vert { - gate_feature_post!(&self, match_beginning_vert, - span, - "Use of a '|' at the beginning of a match arm is experimental") - } visit::walk_arm(self, arm) } |
