From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH] rust: temporarily disable double_parens check
Date: Fri, 10 Oct 2025 17:14:06 +0300 [thread overview]
Message-ID: <CAAjaMXbTonve3KrHm_AfizEq4vH9R53encUwpRG7sNtthqh0HA@mail.gmail.com> (raw)
In-Reply-To: <0766dc6c-6cab-4f56-a8ab-c573aff15421@redhat.com>
On Fri, Oct 10, 2025 at 5:12 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 10/10/25 14:23, Manos Pitsidianakis wrote:
> > On Fri, Oct 10, 2025 at 12:12 AM Paolo Bonzini <pbonzini@redhat.com> 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 <richard.henderson@linaro.org>
> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >> ---
> >
> > 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?
Of course!
>
> > 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.
Makes sense.
prev parent reply other threads:[~2025-10-10 14:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 21:12 [PATCH] rust: temporarily disable double_parens check Paolo Bonzini
2025-10-10 12:23 ` Manos Pitsidianakis
2025-10-10 14:12 ` Paolo Bonzini
2025-10-10 14:14 ` Manos Pitsidianakis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAjaMXbTonve3KrHm_AfizEq4vH9R53encUwpRG7sNtthqh0HA@mail.gmail.com \
--to=manos.pitsidianakis@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).