aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-22 17:56:00 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-22 17:56:00 +0000
commitb9f65b18b85c6e942979cb7e6026ba157488f193 (patch)
tree2f994b6fdfe67d839447a239094a49c25dbb4f8d /crates/ra_syntax/src/grammar
parent595a2f9900d052d0c5cc3529602aec0cbcd52614 (diff)
parentc550c6759d2c684b5ebef141cebd602e90ee931a (diff)
Merge #599
599: Allow placeholder parameters in trait function definitions r=matklad a=regiontog fixes #597 Co-authored-by: Erlend Tobiassen <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/grammar')
-rw-r--r--crates/ra_syntax/src/grammar/params.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/grammar/params.rs b/crates/ra_syntax/src/grammar/params.rs
index 658fc5820..13158429a 100644
--- a/crates/ra_syntax/src/grammar/params.rs
+++ b/crates/ra_syntax/src/grammar/params.rs
@@ -79,7 +79,12 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) {
79 let la1 = p.nth(1); 79 let la1 = p.nth(1);
80 let la2 = p.nth(2); 80 let la2 = p.nth(2);
81 let la3 = p.nth(3); 81 let la3 = p.nth(3);
82 if la0 == IDENT && la1 == COLON 82
83 // test trait_fn_placeholder_parameter
84 // trait Foo {
85 // fn bar(_: u64);
86 // }
87 if (la0 == IDENT || la0 == UNDERSCORE) && la1 == COLON
83 || la0 == AMP && la1 == IDENT && la2 == COLON 88 || la0 == AMP && la1 == IDENT && la2 == COLON
84 || la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON 89 || la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON
85 { 90 {