mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Merge pull request #2813 from jyn514/arg_attributes
Allow attributes before function arguments
This commit is contained in:
commit
90b8a31b83
3 changed files with 45 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue