]> git.proxmox.com Git - rustc.git/blob - tests/ui/lazy-and-or.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }