Skip to contentSkip to conversation

rust: faux: fix C header link

PATCH In review Miguel Ojeda 3 participants 3 messages Aug 4, 2025 – Aug 5, 2025

Subsystems (3)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 rust: faux: fix C header link

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.

Fixes 78418f300d39 ("rust/kernel: Add faux device bindings")

---
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(-)
rust/kernel/faux.rs +1 -1
index 7a906099993f..7fe2dd197e37 100644
@@ -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

reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Miguel Ojeda

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.

Quoted 6 lines

Thus fix it.

Fixes 78418f300d39 ("rust/kernel: Add faux device bindings")

---
Cheers,
Benno

Quoted 7 lines

---
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(-)
reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Miguel Ojeda
Quoted 18 lines · Miguel Ojeda

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.

Quoted 6 lines

Thus fix it.

Fixes 78418f300d39 ("rust/kernel: Add faux device bindings")