2018-07-28 15:34:52 +00:00
|
|
|
#![warn(clippy::overflow_check_conditional)]
|
2023-06-10 11:43:30 +00:00
|
|
|
#![allow(clippy::needless_if)]
|
2016-03-06 15:01:17 +00:00
|
|
|
|
2023-03-07 17:51:48 +00:00
|
|
|
fn test(a: u32, b: u32, c: u32) {
|
2018-12-09 22:26:16 +00:00
|
|
|
if a + b < a {}
|
|
|
|
if a > a + b {}
|
|
|
|
if a + b < b {}
|
|
|
|
if b > a + b {}
|
|
|
|
if a - b > b {}
|
|
|
|
if b < a - b {}
|
|
|
|
if a - b > a {}
|
|
|
|
if a < a - b {}
|
|
|
|
if a + b < c {}
|
|
|
|
if c > a + b {}
|
|
|
|
if a - b < c {}
|
|
|
|
if c > a - b {}
|
|
|
|
let i = 1.1;
|
|
|
|
let j = 2.2;
|
|
|
|
if i + j < i {}
|
|
|
|
if i - j < i {}
|
|
|
|
if i > i + j {}
|
|
|
|
if i - j < i {}
|
2016-03-06 15:01:17 +00:00
|
|
|
}
|
2023-03-07 17:51:48 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
test(1, 2, 3)
|
|
|
|
}
|