2022-01-18 19:38:17 -03:00
|
|
|
// run-pass
|
|
|
|
|
2022-08-20 20:40:08 +02:00
|
|
|
#![feature(let_chains)]
|
2022-03-15 03:48:53 +01:00
|
|
|
#![allow(irrefutable_let_patterns)]
|
2022-01-18 19:38:17 -03: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);
|
|
|
|
}
|