Add regression test for issue #2792

This commit is contained in:
Mingun 2024-08-10 21:29:39 +05:00
parent b4ec2595c9
commit 2afe5b4ef9

View File

@ -0,0 +1,16 @@
#![allow(dead_code)] // we do not read enum fields
use serde_derive::Deserialize;
#[derive(Deserialize)]
#[serde(deny_unknown_fields)]
pub enum A {
B {
c: String,
},
D {
#[serde(flatten)]
e: E,
},
}
#[derive(Deserialize)]
pub struct E {}