Skip to content

Commit

Permalink
Add warning message to wrongly writtern field attribute
Browse files Browse the repository at this point in the history
Bump darling to 0.12 which includes the parsing and error reporting fixes.

Closes #233

darling issue: #233
  • Loading branch information
jonasbb committed Jan 5, 2021
1 parent 812a898 commit 95fc97b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion serde_with_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ proc-macro = true
maintenance = {status = "actively-developed"}

[dependencies]
darling = "0.11.0"
darling = "0.12.0"
proc-macro2 = "1.0.1"
quote = "1.0.0"

Expand Down
6 changes: 6 additions & 0 deletions serde_with_macros/tests/compile-fail/serde_as.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,9 @@ error: Unknown field: `unknw2`
|
59 | #[serde_as(unknwn1 = "Hello", unknw2 = "World")]
| ^^^^^^

error: Unable to parse attribute: expected literal
--> $DIR/serde_as.rs:67:55
|
67 | #[serde_as(serialize_as = "123", deserialize_as = DisplayFromStr)]
| ^^^^^^^^^^^^^^

0 comments on commit 95fc97b

Please sign in to comment.