Add ui test of malformed attribute containing expression
This commit is contained in:
parent
54671259aa
commit
c0296ee11b
9
test_suite/tests/ui/malformed/trailing_expr.rs
Normal file
9
test_suite/tests/ui/malformed/trailing_expr.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use serde_derive::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct S {
|
||||
#[serde(skip_serializing_if, x.is_empty())]
|
||||
x: Vec<()>,
|
||||
}
|
||||
|
||||
fn main() {}
|
5
test_suite/tests/ui/malformed/trailing_expr.stderr
Normal file
5
test_suite/tests/ui/malformed/trailing_expr.stderr
Normal file
@ -0,0 +1,5 @@
|
||||
error: expected `,`
|
||||
--> tests/ui/malformed/trailing_expr.rs:5:35
|
||||
|
|
||||
5 | #[serde(skip_serializing_if, x.is_empty())]
|
||||
| ^
|
Loading…
Reference in New Issue
Block a user