diff --git a/clippy_lints/src/escape.rs b/clippy_lints/src/escape.rs index 0e958c5ad05..a3cbac820c6 100644 --- a/clippy_lints/src/escape.rs +++ b/clippy_lints/src/escape.rs @@ -76,8 +76,7 @@ fn check_fn( }; let fn_def_id = cx.tcx.hir().local_def_id(hir_id); - let region_scope_tree = &cx.tcx.region_scope_tree(fn_def_id); - ExprUseVisitor::new(&mut v, cx.tcx, fn_def_id, cx.param_env, region_scope_tree, cx.tables).consume_body(body); + ExprUseVisitor::new(&mut v, cx.tcx, fn_def_id, cx.param_env, cx.tables).consume_body(body); for node in v.set { span_lint( diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index 52fa7a2c2e4..3b86fddd8bd 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -1678,13 +1678,11 @@ fn check_for_mutation( span_high: None, }; let def_id = def_id::DefId::local(body.hir_id.owner); - let region_scope_tree = &cx.tcx.region_scope_tree(def_id); ExprUseVisitor::new( &mut delegate, cx.tcx, def_id, cx.param_env, - region_scope_tree, cx.tables, ) .walk_expr(body); diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs index c9be602fb45..64786f48719 100644 --- a/clippy_lints/src/needless_pass_by_value.rs +++ b/clippy_lints/src/needless_pass_by_value.rs @@ -134,8 +134,7 @@ fn check_fn( .. } = { let mut ctx = MovedVariablesCtxt::default(); - let region_scope_tree = &cx.tcx.region_scope_tree(fn_def_id); - euv::ExprUseVisitor::new(&mut ctx, cx.tcx, fn_def_id, cx.param_env, region_scope_tree, cx.tables) + euv::ExprUseVisitor::new(&mut ctx, cx.tcx, fn_def_id, cx.param_env, cx.tables) .consume_body(body); ctx }; diff --git a/clippy_lints/src/utils/usage.rs b/clippy_lints/src/utils/usage.rs index 8cd5d7d2d02..e71dfd7401f 100644 --- a/clippy_lints/src/utils/usage.rs +++ b/clippy_lints/src/utils/usage.rs @@ -12,13 +12,11 @@ pub fn mutated_variables<'a, 'tcx>(expr: &'tcx Expr, cx: &'a LateContext<'a, 'tc skip: false, }; let def_id = def_id::DefId::local(expr.hir_id.owner); - let region_scope_tree = &cx.tcx.region_scope_tree(def_id); ExprUseVisitor::new( &mut delegate, cx.tcx, def_id, cx.param_env, - region_scope_tree, cx.tables, ) .walk_expr(expr);