Pass null borrow context to EUV

This commit is contained in:
Manish Goregaokar 2017-10-19 09:27:58 -07:00
parent f47e564a25
commit 1f81dcbebd
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
3 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
};
let region_scope_tree = &cx.tcx.region_scope_tree(fn_def_id);
ExprUseVisitor::new(&mut v, cx.tcx, cx.param_env, region_scope_tree, cx.tables).consume_body(body);
ExprUseVisitor::new(&mut v, cx.tcx, cx.param_env, region_scope_tree, cx.tables, None).consume_body(body);
for node in v.set {
span_lint(

View file

@ -1390,7 +1390,7 @@ fn check_for_mutation(cx: &LateContext, body: &Expr, bound_ids: &[Option<NodeId>
let mut delegate = MutateDelegate { node_id_low: bound_ids[0], node_id_high: bound_ids[1], span_low: None, 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, cx.param_env, region_scope_tree, cx.tables).walk_expr(body);
ExprUseVisitor::new(&mut delegate, cx.tcx, cx.param_env, region_scope_tree, cx.tables, None).walk_expr(body);
delegate.mutation_span()
}

View file

@ -108,7 +108,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
} = {
let mut ctx = MovedVariablesCtxt::new(cx);
let region_scope_tree = &cx.tcx.region_scope_tree(fn_def_id);
euv::ExprUseVisitor::new(&mut ctx, cx.tcx, cx.param_env, region_scope_tree, cx.tables).consume_body(body);
euv::ExprUseVisitor::new(&mut ctx, cx.tcx, cx.param_env, region_scope_tree, cx.tables, None).consume_body(body);
ctx
};