rust/tests/ui/pattern/skipped-ref-pats-issue-125058.rs

18 lines
380 B
Rust

//@ run-pass
//@ edition: 2024
//@ compile-flags: -Zunstable-options
#![allow(incomplete_features)]
#![feature(ref_pat_eat_one_layer_2024)]
struct Foo;
//~^ WARN struct `Foo` is never constructed
fn main() {
|| {
//~^ WARN unused closure that must be used
if let Some(Some(&mut x)) = &mut Some(&mut Some(0)) {
let _: u32 = x;
}
};
}