Add a lint to suggest uint == 0 over uint <= 0

This commit is contained in:
scurest 2016-01-29 00:39:13 -06:00
parent 5402ef3d27
commit e48fbba864
5 changed files with 71 additions and 2 deletions

View file

@ -135,7 +135,7 @@ impl<'a, 'tcx: 'a> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
.get(&borrow_id) {
if LoanCause::AutoRef == loan_cause {
// x.foo()
if adj.autoderefs <= 0 {
if adj.autoderefs == 0 {
self.set.remove(&lid); // Used without autodereffing (i.e. x.clone())
}
} else {