Lint for unused borrows as part of UNUSED_MUST_USE

This commit is contained in:
hi-rustin 2021-06-18 15:09:40 +08:00
parent 1a462831ad
commit 88abd7d81d
18 changed files with 113 additions and 35 deletions

View file

@ -154,6 +154,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
| hir::BinOpKind::Shl
| hir::BinOpKind::Shr => Some("bitwise operation"),
},
hir::ExprKind::AddrOf(..) => Some("borrow"),
hir::ExprKind::Unary(..) => Some("unary operation"),
_ => None,
};