mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-27 01:11:38 +00:00
Suppress dead_code on generated enum variants
This commit is contained in:
parent
036bb92ff3
commit
721bfc4eb3
@ -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