On 10/10/25 14:23, Manos Pitsidianakis wrote:
On Fri, Oct 10, 2025 at 12:12 AM Paolo Bonzini <[email protected]> wrote:
It is showing in the output of the bits! macro and not easy to fix there
(at least not without making the macro more complex). Disable it for
now.
Link: https://github.com/rust-lang/rust-clippy/issues/15852
Reported-by: Richard Henderson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
---
How about putting it in the macro expansion instead of globally allowing it?
macro_rules! foo {
($a:expr, $b:expr, $c:expr, $d:expr) => {
#[allow(clippy::double_parens)]
InterruptMask(((($a.union($b).union($c).union($d))).into_bits()) as
u32)
}
}
Can you do it for procedural macros as well?
Why is the double parenthesis needed here by the way? It's a method chain
It's just how the macro works, occasionally generating double
parentheses keeps the parser simple.
Paolo