]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lazy-and-or.rs
Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup
[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 }