From 234b65fd6155e14f260765aff0fd8c6f7f9e4169 Mon Sep 17 00:00:00 2001 From: Erlend Tobiassen Date: Tue, 22 Jan 2019 18:33:53 +0100 Subject: Allow placeholder parameters in trait fn defs --- crates/ra_syntax/src/grammar/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/grammar/params.rs') diff --git a/crates/ra_syntax/src/grammar/params.rs b/crates/ra_syntax/src/grammar/params.rs index 658fc5820..130660740 100644 --- a/crates/ra_syntax/src/grammar/params.rs +++ b/crates/ra_syntax/src/grammar/params.rs @@ -79,7 +79,7 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) { let la1 = p.nth(1); let la2 = p.nth(2); let la3 = p.nth(3); - if la0 == IDENT && la1 == COLON + if (la0 == IDENT || la0 == UNDERSCORE) && la1 == COLON || la0 == AMP && la1 == IDENT && la2 == COLON || la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON { -- cgit v1.2.3