Merge pull request #2406 from dtolnay/nestedmeta

Rewrite attribute parser using parse_nested_meta
This commit is contained in:
David Tolnay 2023-03-17 17:32:39 -07:00 committed by GitHub
commit 9fc0d13e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 477 additions and 595 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
error: expected `,`
--> tests/ui/malformed/trailing_expr.rs:5:35
error: expected `=`
--> tests/ui/malformed/trailing_expr.rs:5:32
|
5 | #[serde(skip_serializing_if, x.is_empty())]
| ^

View File

@ -1,4 +1,4 @@
error: expected path
error: unexpected literal in nested attribute, expected ident
--> tests/ui/unexpected-literal/container.rs:4:9
|
4 | #[serde("literal")]

View File

@ -1,4 +1,4 @@
error: expected path
error: unexpected literal in nested attribute, expected ident
--> tests/ui/unexpected-literal/field.rs:5:13
|
5 | #[serde("literal")]

View File

@ -1,4 +1,4 @@
error: expected path
error: unexpected literal in nested attribute, expected ident
--> tests/ui/unexpected-literal/variant.rs:5:13
|
5 | #[serde("literal")]