Lint for unused borrows as part of UNUSED_MUST_USE
This commit is contained in:
parent
1a462831ad
commit
88abd7d81d
18 changed files with 113 additions and 35 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue