about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorTaylor Cramer <cramertj@google.com>2018-03-28 17:25:39 +0200
committerTaylor Cramer <cramertj@google.com>2018-03-29 00:27:50 +0200
commite6e6bd27d563b9a53687433feb3d4d4672dafd66 (patch)
tree80905423ecc1e04a3fd2fbe2b3ebac52b030da8c /src/libsyntax
parente5277c1457d397f22ba18a1d40c1318729becbb4 (diff)
downloadrust-e6e6bd27d563b9a53687433feb3d4d4672dafd66.tar.gz
rust-e6e6bd27d563b9a53687433feb3d4d4672dafd66.zip
Stabilize underscore lifetimes
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],