1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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() {}