Remove the need for allow(dead_code) added by PR 2383

This commit is contained in:
David Tolnay 2023-03-08 18:59:56 -08:00
parent 2198463218
commit 0b90f6c96a
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -896,15 +896,14 @@ impl Drop for RemotePackedNonCopyDef {
//////////////////////////////////////////////////////////////////////////
/// Regression tests for <https://github.com/serde-rs/serde/issues/2371>
#[allow(dead_code)]
mod static_and_flatten {
pub mod static_and_flatten {
use serde::Deserialize;
#[derive(Deserialize)]
struct Nested;
pub struct Nested;
#[derive(Deserialize)]
enum ExternallyTagged {
pub enum ExternallyTagged {
Flatten {
#[serde(flatten)]
nested: Nested,
@ -914,7 +913,7 @@ mod static_and_flatten {
#[derive(Deserialize)]
#[serde(tag = "tag")]
enum InternallyTagged {
pub enum InternallyTagged {
Flatten {
#[serde(flatten)]
nested: Nested,
@ -924,7 +923,7 @@ mod static_and_flatten {
#[derive(Deserialize)]
#[serde(tag = "tag", content = "content")]
enum AdjacentlyTagged {
pub enum AdjacentlyTagged {
Flatten {
#[serde(flatten)]
nested: Nested,
@ -934,7 +933,7 @@ mod static_and_flatten {
#[derive(Deserialize)]
#[serde(untagged)]
enum UntaggedWorkaround {
pub enum UntaggedWorkaround {
Flatten {
#[serde(flatten)]
nested: Nested,