allow mut ident patterns in trait methods

closes #928
This commit is contained in:
Aleksey Kladov 2019-03-04 17:47:02 +03:00
parent 11e0851dcf
commit 90122542b2
3 changed files with 28 additions and 12 deletions

View file

@ -83,9 +83,10 @@ fn value_parameter(p: &mut Parser, flavor: Flavor) {
// test trait_fn_placeholder_parameter
// trait Foo {
// fn bar(_: u64);
// fn bar(_: u64, mut x: i32);
// }
if (la0 == IDENT || la0 == UNDERSCORE) && la1 == COLON
|| la0 == MUT_KW && la1 == IDENT && la2 == COLON
|| la0 == AMP && la1 == IDENT && la2 == COLON
|| la0 == AMP && la1 == MUT_KW && la2 == IDENT && la3 == COLON
{