Add regression test for issue #2792
This commit is contained in:
parent
b4ec2595c9
commit
2afe5b4ef9
16
test_suite/tests/regression/issue2792.rs
Normal file
16
test_suite/tests/regression/issue2792.rs
Normal 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 {}
|
Loading…
Reference in New Issue
Block a user