rust/src/test/ui/fn-in-pat.rs
2020-03-12 15:47:36 -05:00

17 lines
252 B
Rust

struct A {}
impl A {
fn new() {}
}
fn hof<F>(_: F) where F: FnMut(()) {}
fn ice() {
hof(|c| match c {
A::new() => (), //~ ERROR expected tuple struct or tuple variant, found associated function
_ => ()
})
}
fn main() {}