mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Merge pull request #1171 from dtolnay/deadenum
Suppress dead_code on generated enum variants
This commit is contained in:
commit
19f1bb6eb8
@ -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 };
|
||||
})
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user