diff options
author | Aleksey Kladov <[email protected]> | 2019-03-04 14:47:02 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-03-04 14:47:02 +0000 |
commit | 90122542b2708a4dde36758d1ff5848764858ac0 (patch) | |
tree | 39296669d8596c646067641dff27b0c9e71a3a4f /crates/ra_parser/src/grammar | |
parent | 11e0851dcfddfe2337bb2d404d716dbd8e4c11d7 (diff) |
allow `mut ident` patterns in trait methods
closes #928
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/params.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/params.rs b/crates/ra_parser/src/grammar/params.rs index a70f067f9..d027578b6 100644 --- a/crates/ra_parser/src/grammar/params.rs +++ b/crates/ra_parser/src/grammar/params.rs | |||
@@ -83,9 +83,10 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) { | |||
83 | 83 | ||
84 | // test trait_fn_placeholder_parameter | 84 | // test trait_fn_placeholder_parameter |
85 | // trait Foo { | 85 | // trait Foo { |
86 | // fn bar(_: u64); | 86 | // fn bar(_: u64, mut x: i32); |
87 | // } | 87 | // } |
88 | if (la0 == IDENT || la0 == UNDERSCORE) && la1 == COLON | 88 | if (la0 == IDENT || la0 == UNDERSCORE) && la1 == COLON |
89 | || la0 == MUT_KW && la1 == IDENT && la2 == COLON | ||
89 | || la0 == AMP && la1 == IDENT && la2 == COLON | 90 | || la0 == AMP && la1 == IDENT && la2 == COLON |
90 | || la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON | 91 | || la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON |
91 | { | 92 | { |