mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 05:03:21 +00:00
Inline MemCategorization into ExprUseVisitor
This commit is contained in:
parent
2baeb9be54
commit
dfc9c9132b
2 changed files with 3 additions and 3 deletions
|
@ -120,7 +120,7 @@ fn imm_borrows_in_expr(cx: &LateContext<'_>, e: &hir::Expr<'_>) -> HirIdSet {
|
|||
|
||||
let mut s = S(HirIdSet::default());
|
||||
let infcx = cx.tcx.infer_ctxt().build();
|
||||
let mut v = ExprUseVisitor::new(
|
||||
let v = ExprUseVisitor::new(
|
||||
&mut s,
|
||||
&infcx,
|
||||
cx.tcx.hir().body_owner_def_id(cx.enclosing_body.unwrap()),
|
||||
|
@ -152,7 +152,7 @@ fn mut_borrows_in_expr(cx: &LateContext<'_>, e: &hir::Expr<'_>) -> HirIdSet {
|
|||
|
||||
let mut s = S(HirIdSet::default());
|
||||
let infcx = cx.tcx.infer_ctxt().build();
|
||||
let mut v = ExprUseVisitor::new(
|
||||
let v = ExprUseVisitor::new(
|
||||
&mut s,
|
||||
&infcx,
|
||||
cx.tcx.hir().body_owner_def_id(cx.enclosing_body.unwrap()),
|
||||
|
|
|
@ -253,7 +253,7 @@ impl<'a, 'tcx> UnwrappableVariablesVisitor<'a, 'tcx> {
|
|||
};
|
||||
|
||||
let infcx = self.cx.tcx.infer_ctxt().build();
|
||||
let mut vis = ExprUseVisitor::new(
|
||||
let vis = ExprUseVisitor::new(
|
||||
&mut delegate,
|
||||
&infcx,
|
||||
cond.hir_id.owner.def_id,
|
||||
|
|
Loading…
Reference in a new issue