* [PATCH] rust: faux: fix C header link
@ 2025-08-04 17:13 Miguel Ojeda
2025-08-04 20:01 ` Benno Lossin
2025-08-05 8:42 ` Alice Ryhl
0 siblings, 2 replies; 3+ messages in thread
From: Miguel Ojeda @ 2025-08-04 17:13 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
Miguel Ojeda, Alex Gaynor
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, rust-for-linux,
linux-kernel, patches, stable
Starting with Rust 1.91.0 (expected 2025-10-30), `rustdoc` has improved
some false negatives around intra-doc links [1], and it found a broken
intra-doc link we currently have:
error: unresolved link to `include/linux/device/faux.h`
--> rust/kernel/faux.rs:7:17
|
7 | //! C header: [`include/linux/device/faux.h`]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `include/linux/device/faux.h` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`
Our `srctree/` C header links are not intra-doc links, thus they need
the link destination.
Thus fix it.
Cc: stable@vger.kernel.org
Link: https://github.com/rust-lang/rust/pull/132748 [1]
Fixes: 78418f300d39 ("rust/kernel: Add faux device bindings")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
It may have been in 1.90, but the beta branch does not have it, and the
rollup PR says 1.91, unlike the PR itself, so I picked 1.91. It happened
just after the version bump to 1.91, so it may have to do with that.
rust/kernel/faux.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/faux.rs b/rust/kernel/faux.rs
index 7a906099993f..7fe2dd197e37 100644
--- a/rust/kernel/faux.rs
+++ b/rust/kernel/faux.rs
@@ -4,7 +4,7 @@
//!
//! This module provides bindings for working with faux devices in kernel modules.
//!
-//! C header: [`include/linux/device/faux.h`]
+//! C header: [`include/linux/device/faux.h`](srctree/include/linux/device/faux.h)
use crate::{bindings, device, error::code::*, prelude::*};
use core::ptr::{addr_of_mut, null, null_mut, NonNull};
base-commit: d2eedaa3909be9102d648a4a0a50ccf64f96c54f
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rust: faux: fix C header link
2025-08-04 17:13 [PATCH] rust: faux: fix C header link Miguel Ojeda
@ 2025-08-04 20:01 ` Benno Lossin
2025-08-05 8:42 ` Alice Ryhl
1 sibling, 0 replies; 3+ messages in thread
From: Benno Lossin @ 2025-08-04 20:01 UTC (permalink / raw)
To: Miguel Ojeda, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Alex Gaynor
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Andreas Hindborg,
Alice Ryhl, Trevor Gross, rust-for-linux, linux-kernel, patches,
stable
On Mon Aug 4, 2025 at 7:13 PM CEST, Miguel Ojeda wrote:
> Starting with Rust 1.91.0 (expected 2025-10-30), `rustdoc` has improved
> some false negatives around intra-doc links [1], and it found a broken
> intra-doc link we currently have:
>
> error: unresolved link to `include/linux/device/faux.h`
> --> rust/kernel/faux.rs:7:17
> |
> 7 | //! C header: [`include/linux/device/faux.h`]
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `include/linux/device/faux.h` in scope
> |
> = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
> = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`
>
> Our `srctree/` C header links are not intra-doc links, thus they need
> the link destination.
>
> Thus fix it.
>
> Cc: stable@vger.kernel.org
> Link: https://github.com/rust-lang/rust/pull/132748 [1]
> Fixes: 78418f300d39 ("rust/kernel: Add faux device bindings")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
---
Cheers,
Benno
> ---
> It may have been in 1.90, but the beta branch does not have it, and the
> rollup PR says 1.91, unlike the PR itself, so I picked 1.91. It happened
> just after the version bump to 1.91, so it may have to do with that.
>
> rust/kernel/faux.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rust: faux: fix C header link
2025-08-04 17:13 [PATCH] rust: faux: fix C header link Miguel Ojeda
2025-08-04 20:01 ` Benno Lossin
@ 2025-08-05 8:42 ` Alice Ryhl
1 sibling, 0 replies; 3+ messages in thread
From: Alice Ryhl @ 2025-08-05 8:42 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Trevor Gross, rust-for-linux,
linux-kernel, patches, stable
On Mon, Aug 4, 2025 at 7:13 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Starting with Rust 1.91.0 (expected 2025-10-30), `rustdoc` has improved
> some false negatives around intra-doc links [1], and it found a broken
> intra-doc link we currently have:
>
> error: unresolved link to `include/linux/device/faux.h`
> --> rust/kernel/faux.rs:7:17
> |
> 7 | //! C header: [`include/linux/device/faux.h`]
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `include/linux/device/faux.h` in scope
> |
> = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
> = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`
>
> Our `srctree/` C header links are not intra-doc links, thus they need
> the link destination.
>
> Thus fix it.
>
> Cc: stable@vger.kernel.org
> Link: https://github.com/rust-lang/rust/pull/132748 [1]
> Fixes: 78418f300d39 ("rust/kernel: Add faux device bindings")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-05 8:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 17:13 [PATCH] rust: faux: fix C header link Miguel Ojeda
2025-08-04 20:01 ` Benno Lossin
2025-08-05 8:42 ` Alice Ryhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox