about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-29 00:41:15 +0000
committerbors <bors@rust-lang.org>2018-03-29 00:41:15 +0000
commit1e652bda20eb7a781fbec19b8c581b8dc0bb8a8d (patch)
treeff2c9f715ad48f126216a2ed1c9339aa97174567 /src/libsyntax
parentd52c44ea8df9f9045e6059cb2d37df743be50bb1 (diff)
parente6e6bd27d563b9a53687433feb3d4d4672dafd66 (diff)
downloadrust-1e652bda20eb7a781fbec19b8c581b8dc0bb8a8d.tar.gz
rust-1e652bda20eb7a781fbec19b8c581b8dc0bb8a8d.zip
Auto merge of #49458 - cramertj:stable-underscore-lt, r=nikomatsakis
Stabilize underscore lifetimes

r? @nikomatsakis
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index ce8c613dc8b..526608d07aa 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -385,6 +385,9 @@ declare_features! (
     // allow `'_` placeholder lifetimes
     (active, underscore_lifetimes, "1.22.0", Some(44524), None),
 
+    // Default match binding modes (RFC 2005)
+    (active, match_default_bindings, "1.22.0", Some(42640), None),
+
     // Trait object syntax with `dyn` prefix
     (active, dyn_trait, "1.22.0", Some(44662), Some(Edition::Edition2018)),
 
@@ -562,6 +565,8 @@ declare_features! (
     (accepted, i128_type, "1.26.0", Some(35118), None),
     // Default match binding modes (RFC 2005)
     (accepted, match_default_bindings, "1.26.0", Some(42640), None),
+    // allow `'_` placeholder lifetimes
+    (accepted, underscore_lifetimes, "1.26.0", Some(44524), None),
 );
 
 // If you change this, please modify src/doc/unstable-book as well. You must
@@ -1792,14 +1797,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
 
         visit::walk_generic_param(self, param)
     }
-
-    fn visit_lifetime(&mut self, lt: &'a ast::Lifetime) {
-        if lt.ident.name == keywords::UnderscoreLifetime.name() {
-            gate_feature_post!(&self, underscore_lifetimes, lt.span,
-                               "underscore lifetimes are unstable");
-        }
-        visit::walk_lifetime(self, lt)
-    }
 }
 
 pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],