mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-05-06 02:07:57 +00:00
Added flatten on enum compile fail test
This commit is contained in:
@@ -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