2022-01-18 16:38:17 -06:00
|
|
|
// run-pass
|
|
|
|
|
2022-08-20 13:40:08 -05:00
|
|
|
#![feature(let_chains)]
|
2022-03-14 21:48:53 -05:00
|
|
|
#![allow(irrefutable_let_patterns)]
|
2022-01-18 16:38:17 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let first = Some(1);
|
|
|
|
let second = Some(2);
|
|
|
|
let mut n = 0;
|
|
|
|
if let x = first && let y = second && 1 == 1 {
|
|
|
|
assert_eq!(x, first);
|
|
|
|
assert_eq!(y, second);
|
|
|
|
n = 1;
|
|
|
|
}
|
|
|
|
assert_eq!(n, 1);
|
|
|
|
}
|