2022-10-13 20:13:52 -07:00
|
|
|
//@ check-pass
|
|
|
|
//@ compile-flags: -Z validate-mir
|
2024-11-10 20:58:00 +01:00
|
|
|
//@ revisions: edition2021 edition2024
|
|
|
|
//@ [edition2021] edition: 2021
|
|
|
|
//@ [edition2024] compile-flags: -Z lint-mir
|
|
|
|
//@ [edition2024] edition: 2024
|
|
|
|
|
|
|
|
#![cfg_attr(edition2021, feature(let_chains))]
|
2022-10-13 20:13:52 -07:00
|
|
|
|
|
|
|
fn let_chains(entry: std::io::Result<std::fs::DirEntry>) {
|
|
|
|
if let Ok(entry) = entry
|
|
|
|
&& let Some(s) = entry.file_name().to_str()
|
|
|
|
&& s.contains("")
|
|
|
|
{}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|