Skip to content

Commit

Permalink
Add regression test for issue #2792
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun committed Aug 10, 2024
1 parent b4ec259 commit 2afe5b4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test_suite/tests/regression/issue2792.rs
Original file line number Diff line number Diff line change
@@ -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 {}

0 comments on commit 2afe5b4

Please sign in to comment.