mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 08:18:03 +00:00
Add tests of #[serde(default)] attribute for units and unions
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
error: #[serde(default)] can only be used on structs
|
||||
--> tests/ui/default-attribute/union.rs:4:9
|
||||
|
|
||||
4 | #[serde(default)]
|
||||
| ^^^^^^^
|
||||
|
||||
error: Serde does not support derive for unions
|
||||
--> tests/ui/default-attribute/union.rs:4:1
|
||||
|
|
||||
4 | / #[serde(default)]
|
||||
5 | | union Union {
|
||||
6 | | f: u8,
|
||||
7 | | }
|
||||
| |_^
|
||||
Reference in New Issue
Block a user