[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aRG9VjsaCjsvAwUn@google.com>
Date: Mon, 10 Nov 2025 10:24:22 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Alex Gaynor <alex.gaynor@...il.com>, Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
"Björn Roy Baron" <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...ts.linux.dev
Subject: Re: [PATCH 01/18] rust: condvar: avoid `pub` in example
On Mon, Nov 10, 2025 at 10:50:06AM +0100, Miguel Ojeda wrote:
> The future move of pin-init to `syn` uncovers the following unreachable
> public item in an example:
>
> error: unreachable `pub` item
> --> rust/doctests_kernel_generated.rs:14683:1
> |
> 14683 | pub struct Example {
> | ---^^^^^^^^^^^^^^^
> | |
> | help: consider restricting its visibility: `pub(crate)`
> |
> = help: or consider exporting it for use by other crates
> = note: `-D unreachable-pub` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(unreachable_pub)]`
>
> There is no real downside of keeping the example as-is until the
> `syn`-based pin-init is introduced, so there is no need to treat it as
> a fix nor to backport it. However, we still need to change it before
> introducing the new pin-init.
>
> Thus do so.
>
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
The unreachable_pub warning normally does not trigger for documentation
tests since using `pub` in documentation tests is not wrong. So this
sounds like a bug in our doc-test setup.
Regardless, I don't mind changing it here for now.
Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Powered by blists - more mailing lists