diff --git a/crates/ra_parser/src/grammar/params.rs b/crates/ra_parser/src/grammar/params.rs index ed4f93347a..4abd61be73 100644 --- a/crates/ra_parser/src/grammar/params.rs +++ b/crates/ra_parser/src/grammar/params.rs @@ -115,7 +115,7 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) { // type Foo = fn(Bar::Baz); // type Qux = fn(baz: Bar::Baz); Flavor::FnPointer => { - if p.at(IDENT) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) { + if (p.at(IDENT) || p.at(UNDERSCORE)) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) { patterns::pattern_single(p); types::ascription(p); } else {