aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorHan Mertens <[email protected]>2020-02-12 20:40:05 +0000
committerHan Mertens <[email protected]>2020-02-12 20:40:05 +0000
commit0e10e77a7820d08332744d91e44940a2321138c3 (patch)
treeb02391e5924309be492197eb21ccf51f5347b9fe /crates/ra_parser
parent3da53ab3e75b0486c1b2e4f74babea10992c4747 (diff)
Support unnamed arguments in function pointers
Fixes #3089
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/grammar/params.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/params.rs b/crates/ra_parser/src/grammar/params.rs
index ed4f93347..4abd61be7 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) {
115 // type Foo = fn(Bar::Baz); 115 // type Foo = fn(Bar::Baz);
116 // type Qux = fn(baz: Bar::Baz); 116 // type Qux = fn(baz: Bar::Baz);
117 Flavor::FnPointer => { 117 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![::]) {
119 patterns::pattern_single(p); 119 patterns::pattern_single(p);
120 types::ascription(p); 120 types::ascription(p);
121 } else { 121 } else {