X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_ast_passes%2Ffeature_gate.rs;h=461072873bb529a08885100c25810393d0df0357;hb=72aaa3a414d17aa0c4f19feafa5bab5f84b60e63;hp=1e4b1ae07776212a8261dc882d999c45b7f71baf;hpb=a529e70be1db5601b224eea741ccbab74f22b0c4;p=rust.git diff --git a/src/librustc_ast_passes/feature_gate.rs b/src/librustc_ast_passes/feature_gate.rs index 1e4b1ae0777..461072873bb 100644 --- a/src/librustc_ast_passes/feature_gate.rs +++ b/src/librustc_ast_passes/feature_gate.rs @@ -339,7 +339,7 @@ fn visit_item(&mut self, i: &'a ast::Item) { } } - ast::ItemKind::Impl(_, polarity, defaultness, ..) => { + ast::ItemKind::Impl { polarity, defaultness, .. } => { if polarity == ast::ImplPolarity::Negative { gate_feature_post!( &self, @@ -470,29 +470,8 @@ fn visit_expr(&mut self, e: &'a ast::Expr) { visit::walk_expr(self, e) } - fn visit_arm(&mut self, arm: &'a ast::Arm) { - visit::walk_arm(self, arm) - } - fn visit_pat(&mut self, pattern: &'a ast::Pat) { match &pattern.kind { - PatKind::Slice(pats) => { - for pat in &*pats { - let span = pat.span; - let inner_pat = match &pat.kind { - PatKind::Ident(.., Some(pat)) => pat, - _ => pat, - }; - if inner_pat.is_rest() { - gate_feature_post!( - &self, - slice_patterns, - span, - "subslice patterns are unstable" - ); - } - } - } PatKind::Box(..) => { gate_feature_post!( &self,