add tests showing the current level of minimization with ==

This commit is contained in:
Oliver Schneider 2016-03-24 15:44:08 +01:00
parent dd6bee3b3f
commit 6904fd5a49
1 changed files with 16 additions and 0 deletions

View File

@ -46,3 +46,19 @@ fn main() {
//|~ HELP for further information visit
//|~ SUGGESTION let _ = !b || a;
}
#[allow(unused, many_single_char_names)]
fn equality_stuff() {
let a: i32 = unimplemented!();
let b: i32 = unimplemented!();
let c: i32 = unimplemented!();
let d: i32 = unimplemented!();
let e: i32 = unimplemented!();
let _ = a == b && a != b;
let _ = a == b && c == 5 && a == b; //~ ERROR this boolean expression can be simplified
//|~ HELP for further information visit
//|~ SUGGESTION let _ = c == 5 && a == b;
let _ = a < b && a >= b;
let _ = a > b && a <= b;
let _ = a > b && a == b;
}