Suppress dead_code on generated enum variants

This commit is contained in:
David Tolnay 2023-02-01 12:38:18 -08:00
parent 036bb92ff3
commit 721bfc4eb3
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

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 };
})
});