rust/tests/ui/fn-in-pat.rs

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

17 lines
252 B
Rust
Raw Normal View History

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