Skip to content

Commit 0e10e77

Browse files
committed
Support unnamed arguments in function pointers
Fixes #3089
1 parent 3da53ab commit 0e10e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ra_parser/src/grammar/params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) {
115115
// type Foo = fn(Bar::Baz);
116116
// type Qux = fn(baz: Bar::Baz);
117117
Flavor::FnPointer => {
118-
if p.at(IDENT) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) {
118+
if (p.at(IDENT) || p.at(UNDERSCORE)) && p.nth(1) == T![:] && !p.nth_at(1, T![::]) {
119119
patterns::pattern_single(p);
120120
types::ascription(p);
121121
} else {

0 commit comments

Comments
 (0)