mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-04 16:41:07 +00:00
Added flatten on enum compile fail test
This commit is contained in:
1 parent
bb2ecb3bc4
commit
99614c7266
2 files changed
+22
-1
No files matched your search
@@ -46,7 +46,7 @@ fn check_flatten(cx: &Ctxt, cont: &Container) {
|
||||
match cont.data {
|
||||
Data::Enum(_) => {
|
||||
if cont.attrs.has_flatten() {
|
||||
cx.error("#[serde(flatten)] is not allowed in an enum");
|
||||
cx.error("#[serde(flatten)] is not supported on enums");
|
||||
}
|
||||
}
|
||||
Data::Struct(_, _) => {
|
||||
|
||||
Reference in new issue
Block a user