From e6e6bd27d563b9a53687433feb3d4d4672dafd66 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Wed, 28 Mar 2018 17:25:39 +0200 Subject: Stabilize underscore lifetimes --- src/libsyntax/feature_gate.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/libsyntax') 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], -- cgit 1.4.1-3-g733a5