Skip to content

Commit

Permalink
Merge pull request #2404 from dtolnay/attributeexpr
Browse files Browse the repository at this point in the history
Add ui test of malformed attribute containing expression
  • Loading branch information
dtolnay committed Mar 18, 2023
2 parents 5467125 + c0296ee commit 9d87851
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test_suite/tests/ui/malformed/trailing_expr.rs
@@ -0,0 +1,9 @@
use serde_derive::Serialize;

#[derive(Serialize)]
struct S {
#[serde(skip_serializing_if, x.is_empty())]
x: Vec<()>,
}

fn main() {}
5 changes: 5 additions & 0 deletions test_suite/tests/ui/malformed/trailing_expr.stderr
@@ -0,0 +1,5 @@
error: expected `,`
--> tests/ui/malformed/trailing_expr.rs:5:35
|
5 | #[serde(skip_serializing_if, x.is_empty())]
| ^

0 comments on commit 9d87851

Please sign in to comment.