Skip to content

Commit 222fb63

Browse files
Lint for unused borrows as part of unused_must_use
1 parent 9b41541 commit 222fb63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_lint/src/unused.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
154154
| hir::BinOpKind::Shl
155155
| hir::BinOpKind::Shr => Some("bitwise operation"),
156156
},
157+
158+
hir::ExprKind::AddrOf(..) => Some("borrow"),
159+
157160
hir::ExprKind::Unary(..) => Some("unary operation"),
158161
_ => None,
159162
};

0 commit comments

Comments
 (0)