Add a lint to suggest uint == 0 over uint <= 0
This commit is contained in:
parent
5402ef3d27
commit
e48fbba864
5 changed files with 71 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue