mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 15:31:07 +00:00
Fixed a compilefail test for flatten on enums
This commit is contained in:
@@ -45,9 +45,7 @@ fn check_getter(cx: &Ctxt, cont: &Container) {
|
||||
fn check_flatten(cx: &Ctxt, cont: &Container) {
|
||||
match cont.data {
|
||||
Data::Enum(_) => {
|
||||
if cont.attrs.has_flatten() {
|
||||
cx.error("#[serde(flatten)] is not supported on enums");
|
||||
}
|
||||
debug_assert!(!cont.attrs.has_flatten());
|
||||
}
|
||||
Data::Struct(_, _) => {
|
||||
for field in cont.data.all_fields() {
|
||||
|
||||
Reference in New Issue
Block a user