mirror of
https://github.com/xemu-project/xemu.git
synced 2026-07-11 01:24:41 +02:00
rust: bits: disable double_parens check
It is showing in the output of the bits! macro when using the nightly toolchain, though it's not clear if it is intentional or a bug. Shut it up for now. Link: https://github.com/rust-lang/rust-clippy/issues/15852 Reported-by: Richard Henderson <richard.henderson@linaro.org> Suggested-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Link: https://lore.kernel.org/r/20251010145756.787800-1-pbonzini@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -401,7 +401,14 @@ pub fn bits_const_internal(ts: TokenStream) -> TokenStream {
|
||||
let ts = proc_macro2::TokenStream::from(ts);
|
||||
let mut it = ts.into_iter();
|
||||
|
||||
BitsConstInternal::parse(&mut it)
|
||||
.unwrap_or_else(syn::Error::into_compile_error)
|
||||
.into()
|
||||
let out = BitsConstInternal::parse(&mut it).unwrap_or_else(syn::Error::into_compile_error);
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/15852
|
||||
quote! {
|
||||
{
|
||||
#[allow(clippy::double_parens)]
|
||||
#out
|
||||
}
|
||||
}
|
||||
.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user