about summary refs log tree commit diff
path: root/tests/ui/pattern/skipped-ref-pats-issue-125058.rs
blob: 2b587ecb91f3016c23c7c7342f2e3c8e0be49b15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ run-pass
//@ edition: 2024

#![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;
        }
    };
}