summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-96169.rs
blob: 14c0a1399a00ebd4b17f3d0bdbbbeac26515f076 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// check-pass
// compile-flags: -Zmir-opt-level=4 --emit=mir
#![allow(unused)]
fn a() -> usize { 0 }

fn bar(_: u32) {}

fn baz() -> *const dyn Fn(u32) { unimplemented!() }

fn foo() {
    match () {
        _ if baz() == &bar as &dyn Fn(u32) => (),
        () => (),
    }
}

fn main() {
}