{"action":"opened","issue":{"url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1110","repository_url":"https://api.github.com/repos/Manishearth/rust-clippy","labels_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1110/labels{/name}","comments_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1110/comments","events_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1110/events","html_url":"https://github.com/Manishearth/rust-clippy/issues/1110","id":166555396,"number":1110,"title":"Lint wrong integer range comparisons","user":{"login":"Boddlnagg","id":1024333,"avatar_url":"https://avatars.githubusercontent.com/u/1024333?v=3","gravatar_id":"","url":"https://api.github.com/users/Boddlnagg","html_url":"https://github.com/Boddlnagg","followers_url":"https://api.github.com/users/Boddlnagg/followers","following_url":"https://api.github.com/users/Boddlnagg/following{/other_user}","gists_url":"https://api.github.com/users/Boddlnagg/gists{/gist_id}","starred_url":"https://api.github.com/users/Boddlnagg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Boddlnagg/subscriptions","organizations_url":"https://api.github.com/users/Boddlnagg/orgs","repos_url":"https://api.github.com/users/Boddlnagg/repos","events_url":"https://api.github.com/users/Boddlnagg/events{/privacy}","received_events_url":"https://api.github.com/users/Boddlnagg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-20T11:04:01Z","updated_at":"2016-07-20T11:04:01Z","closed_at":null,"body":"I don't know if an issue already exists for something like this, but at least I couldn't find one:\r\nI suggest to add a lint that checks for conditions such as\r\n- `i > A || i < B` where `A` and `B` are integer literals (or constants?) with `A` ≤ `B` (always true)\r\n- `i < A && i > B` where `A` and `B` are integer literals (or constants?) with `A` ≤ `B` (always false)\r\n\r\nAfter https://github.com/rust-lang/rust/issues/32311 is stabilized, clippy could also suggest to use `Range::contains`."}}
{"actor":{"display_login":"Boddlnagg"}}