diff options
Diffstat (limited to 'crates/ra_parser/src/grammar/params.rs')
-rw-r--r-- | crates/ra_parser/src/grammar/params.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_parser/src/grammar/params.rs b/crates/ra_parser/src/grammar/params.rs index d027578b6..3d3bd4cc1 100644 --- a/crates/ra_parser/src/grammar/params.rs +++ b/crates/ra_parser/src/grammar/params.rs | |||
@@ -43,7 +43,7 @@ fn list_(p: &mut Parser, flavor: Flavor) { | |||
43 | if flavor.type_required() { | 43 | if flavor.type_required() { |
44 | opt_self_param(p); | 44 | opt_self_param(p); |
45 | } | 45 | } |
46 | while !p.at(EOF) && !p.at(ket) && !(flavor == Flavor::Normal && p.at(DOTDOTDOT)) { | 46 | while !p.at(EOF) && !p.at(ket) && !(flavor.type_required() && p.at(DOTDOTDOT)) { |
47 | if !p.at_ts(VALUE_PARAMETER_FIRST) { | 47 | if !p.at_ts(VALUE_PARAMETER_FIRST) { |
48 | p.error("expected value parameter"); | 48 | p.error("expected value parameter"); |
49 | break; | 49 | break; |
@@ -55,7 +55,7 @@ fn list_(p: &mut Parser, flavor: Flavor) { | |||
55 | } | 55 | } |
56 | // test param_list_vararg | 56 | // test param_list_vararg |
57 | // extern "C" { fn printf(format: *const i8, ...) -> i32; } | 57 | // extern "C" { fn printf(format: *const i8, ...) -> i32; } |
58 | if flavor == Flavor::Normal { | 58 | if flavor.type_required() { |
59 | p.eat(DOTDOTDOT); | 59 | p.eat(DOTDOTDOT); |
60 | } | 60 | } |
61 | p.expect(ket); | 61 | p.expect(ket); |