Re: [PATCH] rust: allow `clippy::disallowed_names` for doctests

From: Benno Lossin
Date: Mon Nov 17 2025 - 10:52:52 EST


On Mon Nov 17, 2025 at 9:07 AM CET, Miguel Ojeda wrote:
> Examples (i.e. doctests) may want to use names such as `foo`, thus the
> `clippy::disallowed_names` lint gets in the way.
>
> Thus allow it for all doctests.
>
> In addition, remove it from the existing `expect`s we have in a few
> doctests.
>
> This does not mean that we should stop trying to find good names for
> our examples, though.
>
> Suggested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Link: https://lore.kernel.org/rust-for-linux/aRHSLChi5HYXW4-9@xxxxxxxxxx/
> Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Acked-by: Benno Lossin <lossin@xxxxxxxxxx>

Cheers,
Benno

> ---
> rust/kernel/init.rs | 3 +--
> rust/kernel/types.rs | 1 -
> scripts/rustdoc_test_gen.rs | 2 +-
> 3 files changed, 2 insertions(+), 4 deletions(-)