mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 20:23:59 +00:00
17 lines
313 B
Rust
17 lines
313 B
Rust
// run-pass
|
|
|
|
#![feature(let_chains)]
|
|
#![allow(irrefutable_let_patterns)]
|
|
|
|
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);
|
|
}
|