public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* pin-init Clippy nightly trivial warning in 6.18.y
@ 2026-03-01 18:30 Miguel Ojeda
  2026-03-01 18:39 ` Miguel Ojeda
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Miguel Ojeda @ 2026-03-01 18:30 UTC (permalink / raw)
  To: Benno Lossin, Gary Guo; +Cc: rust-for-linux

Hi Benno, Gary,

With nightly Clippy in 6.18.y, I am seeing a trivial warning, which I
am wondering if we would want to keep enabled or not, i.e. I can see
you may want to keep the `nesting` value check inside like you do in
the nested `match nesting` below that one:

      CLIPPY P rust/libmacros.so - due to command line change
    warning: this `if` can be collapsed into the outer `match`
      --> rust/pin-init/internal/src/helpers.rs:91:17
       |
    91 | /                 if nesting == 1 {
    92 | |                     impl_generics.push(tt.clone());
    93 | |                     impl_generics.push(tt);
    94 | |                     skip_until_comma = false;
    95 | |                 }
       | |_________________^
       |
       = help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
       = note: `-W clippy::collapsible-match` implied by `-W clippy::all`
       = help: to override `-W clippy::all` add
`#[allow(clippy::collapsible_match)]`
    help: collapse nested if block
       |
    90 ~             TokenTree::Punct(p) if skip_until_comma &&
p.as_char() == ','
    91 ~                 && nesting == 1 => {
    92 |                     impl_generics.push(tt.clone());
    93 |                     impl_generics.push(tt);
    94 |                     skip_until_comma = false;
    95 ~                 }
       |

Anyway, it is just in 6.18.y given the `syn` rewrite and not urgent
since it is nightly.

Please let me know what you think about the warning overall and for
6.18.y we can backport a targeted clean up.

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-01 20:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01 18:30 pin-init Clippy nightly trivial warning in 6.18.y Miguel Ojeda
2026-03-01 18:39 ` Miguel Ojeda
2026-03-01 19:14 ` Gary Guo
2026-03-01 20:06 ` Benno Lossin
2026-03-01 20:19   ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox