Skip to content

Commit 37260e1

Browse files
Allow trailing comma after argument in query definition
1 parent 7205fc5 commit 37260e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_macros/src/query.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ impl Parse for Query {
5151
let key = Pat::parse_single(&arg_content)?;
5252
arg_content.parse::<Token![:]>()?;
5353
let arg = arg_content.parse()?;
54+
let _ = arg_content.parse::<Option<Token![,]>>()?;
5455
let result = input.parse()?;
5556

5657
// Parse the query modifiers

0 commit comments

Comments
 (0)