From 90122542b2708a4dde36758d1ff5848764858ac0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 4 Mar 2019 17:47:02 +0300 Subject: allow `mut ident` patterns in trait methods closes #928 --- crates/ra_parser/src/grammar/params.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_parser') 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) { // 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 { -- cgit v1.2.3