diff options
| author | bors <bors@rust-lang.org> | 2016-11-08 02:06:45 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-08 02:06:45 -0800 |
| commit | 38a959a543dfc70a67e64f7d369ed6c9e12fc806 (patch) | |
| tree | 711c672b069b6753631e2bf8e809991a88028bce /src/libsyntax | |
| parent | 57f971bc1610ef57c57616822c60aadc7e477904 (diff) | |
| parent | 74bb5945635b5aaacd238632932baaa294694ce3 (diff) | |
| download | rust-38a959a543dfc70a67e64f7d369ed6c9e12fc806.tar.gz rust-38a959a543dfc70a67e64f7d369ed6c9e12fc806.zip | |
Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakis
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: https://github.com/rust-lang/rust/pull/36203 Closes https://github.com/rust-lang/rust/issues/33627 r? @nikomatsakis
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 17 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 2 |
2 files changed, 3 insertions, 16 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index ba162087151..c5fae9f3236 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -268,9 +268,6 @@ declare_features! ( // Allows cfg(target_has_atomic = "..."). (active, cfg_target_has_atomic, "1.9.0", Some(32976)), - // Allows `..` in tuple (struct) patterns - (active, dotdot_in_tuple_patterns, "1.10.0", Some(33627)), - // Allows `impl Trait` in function return types. (active, conservative_impl_trait, "1.12.0", Some(34511)), @@ -359,6 +356,8 @@ declare_features! ( (accepted, deprecated, "1.9.0", Some(29935)), // `expr?` (accepted, question_mark, "1.14.0", Some(31436)), + // Allows `..` in tuple (struct) patterns + (accepted, dotdot_in_tuple_patterns, "1.14.0", Some(33627)), ); // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -1202,18 +1201,6 @@ impl<'a> Visitor for PostExpansionVisitor<'a> { pattern.span, "box pattern syntax is experimental"); } - PatKind::Tuple(_, ddpos) - if ddpos.is_some() => { - gate_feature_post!(&self, dotdot_in_tuple_patterns, - pattern.span, - "`..` in tuple patterns is experimental"); - } - PatKind::TupleStruct(_, ref fields, ddpos) - if ddpos.is_some() && !fields.is_empty() => { - gate_feature_post!(&self, dotdot_in_tuple_patterns, - pattern.span, - "`..` in tuple struct patterns is experimental"); - } PatKind::TupleStruct(_, ref fields, ddpos) if ddpos.is_none() && fields.is_empty() => { gate_feature_post!(&self, relaxed_adts, pattern.span, diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index b86e508d899..feed400897c 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -34,7 +34,7 @@ #![cfg_attr(stage0, feature(question_mark))] #![feature(rustc_diagnostic_macros)] #![feature(specialization)] -#![feature(dotdot_in_tuple_patterns)] +#![cfg_attr(stage0, feature(dotdot_in_tuple_patterns))] extern crate core; extern crate serialize; |
