Skip to content

rust: cpufreq: suppress clippy::double_parens in Policy doctest

John Hubbard linux-pm lkml rust-for-linux 2 versions – Applied

Status from this message: Applied to `rust-fixes` -- thanks everyone!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 4 repliesApplied
  2. v11 patch 10 repliesSuperseded

Changes in v2 from the cover letter

* Drop the v1 approach of splitting format arguments.

* Drop the rustdoc_test_gen.rs blanket suppress (was posted inline during discussion, never sent as a formal patch).

* Instead, add a local #[allow(clippy::double_parens)] with a reason attribute on the specific doctest, per Gary and Miguel's suggestions.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/1rust: cpufreq: suppress clippy::double_parens in Policy doctestrust/kernel/cpufreq.rs+1 -00 replies

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchViresh Kumar
SeriesA-b
1/1

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/1] rust: cpufreq: suppress clippy::double_parens in Policy doctest

The kernel fmt! proc macro wraps each format argument as &(arg). Passing a tuple like (a, b) produces &((a, b)) after expansion, which Clippy flags as double_parens. This is a false positive, fixed in Clippy 1.92 (rust-lang/rust-clippy#15939), but the minimum toolchain (1.78) still triggers it.

Add a local #[allow] with a reason attribute on the affected doctest function so it can be removed once the minimum toolchain moves past 1.92.

Changes in v2:
* Drop the v1 approach of splitting format arguments.

* Drop the rustdoc_test_gen.rs blanket suppress (was posted inline during discussion, never sent as a formal patch).

* Instead, add a local #[allow(clippy::double_parens)] with a reason attribute on the specific doctest, per Gary and Miguel's suggestions.

v1 is here:

    https://lore.kernel.org/[email protected]

John Hubbard (1):
rust: cpufreq: suppress clippy::double_parens in Policy doctest

 rust/kernel/cpufreq.rs | 1 +
 1 file changed, 1 insertion(+)

base-commit: 80234b5ab240f52fa45d201e899e207b9265ef91

Signature · 1 line
2.53.0