Merge pull request #2404 from dtolnay/attributeexpr

Add ui test of malformed attribute containing expression
This commit is contained in:
David Tolnay 2023-03-17 17:14:54 -07:00 committed by GitHub
commit 9d87851f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,9 @@
use serde_derive::Serialize;
#[derive(Serialize)]
struct S {
#[serde(skip_serializing_if, x.is_empty())]
x: Vec<()>,
}
fn main() {}

View File

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