serde/test_suite/tests/regression/issue2792.rs

19 lines
281 B
Rust
Raw Normal View History

2024-08-10 11:29:39 -05:00
#![allow(dead_code)] // we do not read enum fields
2024-08-11 01:34:36 -05:00
2024-08-10 11:29:39 -05:00
use serde_derive::Deserialize;
#[derive(Deserialize)]
#[serde(deny_unknown_fields)]
pub enum A {
B {
c: String,
},
D {
#[serde(flatten)]
e: E,
},
}
2024-08-11 01:34:36 -05:00
2024-08-10 11:29:39 -05:00
#[derive(Deserialize)]
pub struct E {}