Skip to content

Commit c1c5c35

Browse files
committed
Fix arguments on ExprUseVisitor::new
1 parent dc9d839 commit c1c5c35

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

clippy_lints/src/escape.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxedLocal {
7676
};
7777

7878
let fn_def_id = cx.tcx.hir().local_def_id(hir_id);
79-
let region_scope_tree = &cx.tcx.region_scope_tree(fn_def_id);
80-
ExprUseVisitor::new(&mut v, cx.tcx, fn_def_id, cx.param_env, region_scope_tree, cx.tables).consume_body(body);
79+
ExprUseVisitor::new(&mut v, cx.tcx, fn_def_id, cx.param_env, cx.tables).consume_body(body);
8180

8281
for node in v.set {
8382
span_lint(

clippy_lints/src/loops.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,13 +1678,11 @@ fn check_for_mutation(
16781678
span_high: None,
16791679
};
16801680
let def_id = def_id::DefId::local(body.hir_id.owner);
1681-
let region_scope_tree = &cx.tcx.region_scope_tree(def_id);
16821681
ExprUseVisitor::new(
16831682
&mut delegate,
16841683
cx.tcx,
16851684
def_id,
16861685
cx.param_env,
1687-
region_scope_tree,
16881686
cx.tables,
16891687
)
16901688
.walk_expr(body);

clippy_lints/src/needless_pass_by_value.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
134134
..
135135
} = {
136136
let mut ctx = MovedVariablesCtxt::default();
137-
let region_scope_tree = &cx.tcx.region_scope_tree(fn_def_id);
138-
euv::ExprUseVisitor::new(&mut ctx, cx.tcx, fn_def_id, cx.param_env, region_scope_tree, cx.tables)
137+
euv::ExprUseVisitor::new(&mut ctx, cx.tcx, fn_def_id, cx.param_env, cx.tables)
139138
.consume_body(body);
140139
ctx
141140
};

clippy_lints/src/utils/usage.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ pub fn mutated_variables<'a, 'tcx>(expr: &'tcx Expr, cx: &'a LateContext<'a, 'tc
1212
skip: false,
1313
};
1414
let def_id = def_id::DefId::local(expr.hir_id.owner);
15-
let region_scope_tree = &cx.tcx.region_scope_tree(def_id);
1615
ExprUseVisitor::new(
1716
&mut delegate,
1817
cx.tcx,
1918
def_id,
2019
cx.param_env,
21-
region_scope_tree,
2220
cx.tables,
2321
)
2422
.walk_expr(expr);

0 commit comments

Comments
 (0)