Skip to content

Commit 3ee4e5f

Browse files
committed
Fix rebase
1 parent 3e5809d commit 3ee4e5f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_errors::{
77
};
88
use rustc_hir as hir;
99
use rustc_hir::def_id::DefId;
10-
use rustc_hir::intravisit::{walk_expr, Visitor};
10+
use rustc_hir::intravisit::{walk_block, walk_expr, Visitor};
1111
use rustc_hir::{AsyncGeneratorKind, GeneratorKind};
1212
use rustc_infer::infer::TyCtxtInferExt;
1313
use rustc_infer::traits::ObligationCause;
@@ -1504,8 +1504,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
15041504
let mut suggested = false;
15051505
let msg = "consider using a `let` binding to create a longer lived value";
15061506

1507-
use rustc_hir::intravisit::Visitor;
1508-
15091507
/// We check that there's a single level of block nesting to ensure always correct
15101508
/// suggestions. If we don't, then we only provide a free-form message to avoid
15111509
/// misleading users in cases like `src/test/ui/nll/borrowed-temporary-error.rs`.
@@ -1520,14 +1518,14 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
15201518
impl<'tcx> Visitor<'tcx> for NestedStatementVisitor {
15211519
fn visit_block(&mut self, block: &hir::Block<'tcx>) {
15221520
self.current += 1;
1523-
rustc_hir::intravisit::walk_block(self, block);
1521+
walk_block(self, block);
15241522
self.current -= 1;
15251523
}
15261524
fn visit_expr(&mut self, expr: &hir::Expr<'tcx>) {
15271525
if self.span == expr.span {
15281526
self.found = self.current;
15291527
}
1530-
rustc_hir::intravisit::walk_expr(self, expr);
1528+
walk_expr(self, expr);
15311529
}
15321530
}
15331531
let source_info = self.body.source_info(location);

0 commit comments

Comments
 (0)