fn expand_bits_checks_for_field(&self, field_info: FieldInfo<'_>) -> TokenStream2 {
        let FieldInfo {
            index: _,
            field,
            config,
        } = field_info;
        let span = field.span();
        let bits_check = match &config.bits {
            Some(bits) => {
                let ty = &field.ty;
                let expected_bits = bits.value;
                let span = bits.span;
                Some(quote_spanned!(span =>
                    let _: ::modular_bitfield::private::checks::BitsCheck::<[(); #expected_bits]> =
                        ::modular_bitfield::private::checks::BitsCheck::<[(); #expected_bits]>{
                            arr: [(); <#ty as ::modular_bitfield::Specifier>::BITS]
                        };
                ))
            }
            None => None,
        };
        quote_spanned!(span=>
            const _: () = {
                #bits_check
            };
        )
    }
/// Generates code to check for the bit size arguments of bitfields.
Generates code to check for the bit size arguments of bitfields.
Generates code to check for the bit size arguments of bitfields .
fn expand_bits_checks_for_field(&self, field_info: FieldInfo<'_>) -> TokenStream2 {
        let FieldInfo {
            index: _,
            field,
            config,
        } = field_info;
        let span = field.span();
        let bits_check = match &config.bits {
            Some(bits) => {
                let ty = &field.ty;
                let expected_bits = bits.value;
                let span = bits.span;
                Some(quote_spanned!(span =>
                    let _: ::modular_bitfield::private::checks::BitsCheck::<[(); #expected_bits]> =
                        ::modular_bitfield::private::checks::BitsCheck::<[(); #expected_bits]>{
                            arr: [(); <#ty as ::modular_bitfield::Specifier>::BITS]
                        };
                ))
            }
            None => None,
        };
        quote_spanned!(span=>
            const _: () = {
                #bits_check
            };
        )
    }
fn expand_bits_checks_for_field ( & self , field_info : FieldInfo < ' _ > ) -> TokenStream2 { let FieldInfo { index : _ , field , config , } = field_info ; let span = field . span ( ) ; let bits_check = match & config . bits { Some ( bits ) => { let ty = & field . ty ; let expected_bits = bits . value ; let span = bits . span ; Some ( quote_spanned ! ( span let modular_bitfield private checks BitsCheck [ ( ) expected_bits ] modular_bitfield private checks BitsCheck [ ( ) expected_bits ] { arr [ ( ) ty as modular_bitfield Specifier BITS ] } ) ) } None => None , } ; quote_spanned ! ( span const ( ) { bits_check } ) }
Generates code to check for the bit size arguments of bitfields.
Generates code to check for the bit size arguments of bitfields .
&self
field_info
FieldInfo<'_>
&self
field_info
FieldInfo<'_>