]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-96169.rs
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
[rust.git] / tests / ui / consts / issue-96169.rs
1 // check-pass
2 // compile-flags: -Zmir-opt-level=4 --emit=mir
3 #![allow(unused)]
4 fn a() -> usize { 0 }
5
6 fn bar(_: u32) {}
7
8 fn baz() -> *const dyn Fn(u32) { unimplemented!() }
9
10 fn foo() {
11     match () {
12         _ if baz() == &bar as &dyn Fn(u32) => (),
13         () => (),
14     }
15 }
16
17 fn main() {
18 }