diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-07-15 11:07:20 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-07-15 11:14:06 -0700 |
| commit | 3ee4e5f7040e2c7bca4dd39a6c5670c1a343eeb5 (patch) | |
| tree | de98f8b07492608241aafd8565f75e3566dcf7eb | |
| parent | 3e5809d94ff642c4ae9ed80e46d3715fdf2c50c2 (diff) | |
| download | rust-3ee4e5f7040e2c7bca4dd39a6c5670c1a343eeb5.tar.gz rust-3ee4e5f7040e2c7bca4dd39a6c5670c1a343eeb5.zip | |
Fix rebase
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs index c4eed784b88..bc64cb81179 100644 --- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs +++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs @@ -7,7 +7,7 @@ use rustc_errors::{ }; use rustc_hir as hir; use rustc_hir::def_id::DefId; -use rustc_hir::intravisit::{walk_expr, Visitor}; +use rustc_hir::intravisit::{walk_block, walk_expr, Visitor}; use rustc_hir::{AsyncGeneratorKind, GeneratorKind}; use rustc_infer::infer::TyCtxtInferExt; use rustc_infer::traits::ObligationCause; @@ -1504,8 +1504,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { let mut suggested = false; let msg = "consider using a `let` binding to create a longer lived value"; - use rustc_hir::intravisit::Visitor; - /// We check that there's a single level of block nesting to ensure always correct /// suggestions. If we don't, then we only provide a free-form message to avoid /// misleading users in cases like `src/test/ui/nll/borrowed-temporary-error.rs`. @@ -1520,14 +1518,14 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { impl<'tcx> Visitor<'tcx> for NestedStatementVisitor { fn visit_block(&mut self, block: &hir::Block<'tcx>) { self.current += 1; - rustc_hir::intravisit::walk_block(self, block); + walk_block(self, block); self.current -= 1; } fn visit_expr(&mut self, expr: &hir::Expr<'tcx>) { if self.span == expr.span { self.found = self.current; } - rustc_hir::intravisit::walk_expr(self, expr); + walk_expr(self, expr); } } let source_info = self.body.source_info(location); |
