mirror of https://github.com/rust-lang/rust.git
Fix more new for_loops_over_fallibles hits in compiler.
This commit is contained in:
parent
ea549fd176
commit
0e467596ff
|
@ -6,7 +6,7 @@
|
|||
//!
|
||||
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/borrow_check.html
|
||||
|
||||
use rustc_ast::visit::walk_list;
|
||||
use rustc_ast::visit::visit_opt;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -168,7 +168,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
|
|||
hir::StmtKind::Expr(..) | hir::StmtKind::Semi(..) => visitor.visit_stmt(statement),
|
||||
}
|
||||
}
|
||||
walk_list!(visitor, visit_expr, &blk.expr);
|
||||
visit_opt!(visitor, visit_expr, &blk.expr);
|
||||
}
|
||||
|
||||
visitor.cx = prev_cx;
|
||||
|
|
|
@ -925,7 +925,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
for subpattern in prefix.iter() {
|
||||
self.visit_primary_bindings(subpattern, pattern_user_ty.clone().index(), f);
|
||||
}
|
||||
for subpattern in slice {
|
||||
if let Some(subpattern) = slice {
|
||||
self.visit_primary_bindings(
|
||||
subpattern,
|
||||
pattern_user_ty.clone().subslice(from, to),
|
||||
|
|
Loading…
Reference in New Issue