]> git.lizzy.rs Git - rust.git/blob - tests/ui/lazy-and-or.rs
Rollup merge of #107740 - oli-obk:lock_tcx, r=petrochenkov
[rust.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 }