Fix new for_loops_over_fallibles hits in compiler.
This commit is contained in:
parent
4be041a2cd
commit
7d7eb973d0
@ -3,7 +3,7 @@
|
||||
use crate::errors;
|
||||
use core::ops::ControlFlow;
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::visit::walk_list;
|
||||
use rustc_ast::visit::visit_opt;
|
||||
use rustc_ast::{attr, EnumDef, VariantData};
|
||||
use rustc_expand::base::{Annotatable, DummyResult, ExtCtxt};
|
||||
use rustc_span::symbol::Ident;
|
||||
@ -224,7 +224,7 @@ fn visit_variant(&mut self, v: &'a rustc_ast::Variant) {
|
||||
self.visit_ident(v.ident);
|
||||
self.visit_vis(&v.vis);
|
||||
self.visit_variant_data(&v.data);
|
||||
walk_list!(self, visit_anon_const, &v.disr_expr);
|
||||
visit_opt!(self, visit_anon_const, &v.disr_expr);
|
||||
for attr in &v.attrs {
|
||||
rustc_ast::visit::walk_attribute(self, attr);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
use crate::{ResolutionError, Resolver, Segment, UseError};
|
||||
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::visit::{walk_list, AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor};
|
||||
use rustc_ast::visit::{visit_opt, walk_list, AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor};
|
||||
use rustc_ast::*;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
|
||||
use rustc_errors::{codes::*, Applicability, DiagArgValue, IntoDiagArg, StashKey};
|
||||
@ -3286,7 +3286,7 @@ fn resolve_params(&mut self, params: &'ast [Param]) {
|
||||
fn resolve_local(&mut self, local: &'ast Local) {
|
||||
debug!("resolving local ({:?})", local);
|
||||
// Resolve the type.
|
||||
walk_list!(self, visit_ty, &local.ty);
|
||||
visit_opt!(self, visit_ty, &local.ty);
|
||||
|
||||
// Resolve the initializer.
|
||||
if let Some((init, els)) = local.kind.init_else_opt() {
|
||||
@ -3485,8 +3485,8 @@ fn check_consistent_bindings(&mut self, pat: &'ast Pat) {
|
||||
fn resolve_arm(&mut self, arm: &'ast Arm) {
|
||||
self.with_rib(ValueNS, RibKind::Normal, |this| {
|
||||
this.resolve_pattern_top(&arm.pat, PatternSource::Match);
|
||||
walk_list!(this, visit_expr, &arm.guard);
|
||||
walk_list!(this, visit_expr, &arm.body);
|
||||
visit_opt!(this, visit_expr, &arm.guard);
|
||||
visit_opt!(this, visit_expr, &arm.body);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user