Stabilize underscore lifetimes
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user