]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lazy-and-or.rs
Override rustc version in ui and mir-opt tests to get stable hashes
[rust.git] / src / test / ui / lazy-and-or.rs
1 // run-pass
2
3 fn incr(x: &mut isize) -> bool { *x += 1; assert!((false)); return false; }
4
5 pub fn main() {
6     let x = 1 == 2 || 3 == 3;
7     assert!((x));
8     let mut y: isize = 10;
9     println!("{}", x || incr(&mut y));
10     assert_eq!(y, 10);
11     if true && x { assert!((true)); } else { assert!((false)); }
12 }