rust/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs

12 lines
169 B
Rust
Raw Normal View History

2022-01-18 16:38:17 -06:00
// check-pass
#![feature(let_chains)]
2022-01-18 16:38:17 -06:00
fn main() {
let x = Some(vec!["test"]);
if let Some(v) = x && v.is_empty() {
println!("x == Some([])");
}
}