Skip to content

Commit dfc9c91

Browse files
Inline MemCategorization into ExprUseVisitor
1 parent 2baeb9b commit dfc9c91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/operators/assign_op_pattern.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ fn imm_borrows_in_expr(cx: &LateContext<'_>, e: &hir::Expr<'_>) -> HirIdSet {
120120

121121
let mut s = S(HirIdSet::default());
122122
let infcx = cx.tcx.infer_ctxt().build();
123-
let mut v = ExprUseVisitor::new(
123+
let v = ExprUseVisitor::new(
124124
&mut s,
125125
&infcx,
126126
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 {
152152

153153
let mut s = S(HirIdSet::default());
154154
let infcx = cx.tcx.infer_ctxt().build();
155-
let mut v = ExprUseVisitor::new(
155+
let v = ExprUseVisitor::new(
156156
&mut s,
157157
&infcx,
158158
cx.tcx.hir().body_owner_def_id(cx.enclosing_body.unwrap()),

clippy_lints/src/unwrap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ impl<'a, 'tcx> UnwrappableVariablesVisitor<'a, 'tcx> {
253253
};
254254

255255
let infcx = self.cx.tcx.infer_ctxt().build();
256-
let mut vis = ExprUseVisitor::new(
256+
let vis = ExprUseVisitor::new(
257257
&mut delegate,
258258
&infcx,
259259
cond.hir_id.owner.def_id,

0 commit comments

Comments
 (0)