Nest attrs into exprs in function args

This commit is contained in:
Aleksey Kladov 2020-01-17 11:47:07 +01:00
parent b7c45fba57
commit 3a859e587f
3 changed files with 23 additions and 32 deletions

View file

@ -564,12 +564,9 @@ fn arg_list(p: &mut Parser) {
// fn main() {
// foo(#[attr] 92)
// }
attributes::outer_attributes(p);
if !p.at_ts(EXPR_FIRST) {
p.error("expected expression");
if !expr_with_attrs(p) {
break;
}
expr(p);
if !p.at(T![')']) && !p.expect(T![,]) {
break;
}