Inline MemCategorization into ExprUseVisitor

This commit is contained in:
Michael Goulet 2024-05-08 13:10:50 -04:00
parent 2baeb9be54
commit dfc9c9132b
2 changed files with 3 additions and 3 deletions

View file

@ -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()),

View file

@ -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,