Merge pull request #1171 from dtolnay/deadenum

Suppress dead_code on generated enum variants
This commit is contained in:
David Tolnay 2023-02-01 12:43:29 -08:00 committed by GitHub
commit 19f1bb6eb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,6 +321,7 @@ fn expand_enum(enm: &Enum) -> TokenStream {
Some(quote_spanned! {span=>
#doc
#attrs
#[allow(dead_code)]
pub const #variant_ident: Self = #ident { repr: #discriminant };
})
});