rust/tests/ui/consts/issue-96169.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
291 B
Rust
Raw Normal View History

2022-07-06 15:44:35 +00:00
// 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() {
}