Merge pull request #2813 from jyn514/arg_attributes

Allow attributes before function arguments
This commit is contained in:
Aleksey Kladov 2020-01-17 11:15:07 +01:00 committed by GitHub
commit 90b8a31b83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 0 deletions

View file

@ -540,6 +540,11 @@ fn arg_list(p: &mut Parser) {
let m = p.start();
p.bump(T!['(']);
while !p.at(T![')']) && !p.at(EOF) {
// test arg_with_attr
// fn main() {
// foo(#[attr] 92)
// }
attributes::outer_attributes(p);
if !p.at_ts(EXPR_FIRST) {
p.error("expected expression");
break;