mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
janitor: Fix warnings about unused members
I get warnings about unused members using the nightly compiler, one for each member in all structs that derive the `FieldOffsets` macro. That is a lot. This fixes that as well as the one occurrence of that same warning in unrelated code.
This commit is contained in:
parent
5e9d352217
commit
9faffc75bb
2 changed files with 5 additions and 4 deletions
|
|
@ -218,6 +218,7 @@ pub fn const_field_offset(input: TokenStream) -> TokenStream {
|
|||
},
|
||||
Some(quote! {
|
||||
/// Make sure that Unpin is not implemented
|
||||
#[allow(dead_code)]
|
||||
pub struct __MustNotImplUnpin<'__dummy_lifetime> (
|
||||
#(#types, )*
|
||||
::core::marker::PhantomData<&'__dummy_lifetime ()>
|
||||
|
|
@ -245,7 +246,7 @@ pub fn const_field_offset(input: TokenStream) -> TokenStream {
|
|||
// Build the output, possibly using quasi-quotation
|
||||
let expanded = quote! {
|
||||
#[doc = #doc]
|
||||
#[allow(missing_docs, non_camel_case_types)]
|
||||
#[allow(missing_docs, non_camel_case_types, dead_code)]
|
||||
#struct_vis struct #field_struct_name {
|
||||
#(#vis #fields : #crate_::FieldOffset<#struct_name, #types, #pin_flag>,)*
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue