Skip to content

Commit

Permalink
rust: print: use explicit link in documentation
Browse files Browse the repository at this point in the history
The future `rustdoc` in the Rust 1.73.0 upgrade requires an explicit
link for `pr_info!`:

    error: unresolved link to `pr_info`
       --> rust/kernel/print.rs:395:63
        |
    395 | /// Use only when continuing a previous `pr_*!` macro (e.g. [`pr_info!`]).
        |                                                               ^^^^^^^^ no item named `pr_info` in scope
        |
        = note: `macro_rules` named `pr_info` exists in this crate, but it is not in scope at this link's location
        = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`

Thus do so to avoid a broken link while upgrading.

Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Vincenzo Palazzo <[email protected]>
Reviewed-by: Finn Behrens <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Oct 15, 2023
1 parent c61bcc2 commit a53d8cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rust/kernel/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ macro_rules! pr_debug (
/// Mimics the interface of [`std::print!`]. See [`core::fmt`] and
/// `alloc::format!` for information about the formatting syntax.
///
/// [`pr_info!`]: crate::pr_info!
/// [`pr_cont`]: https://www.kernel.org/doc/html/latest/core-api/printk-basics.html#c.pr_cont
/// [`std::print!`]: https://doc.rust-lang.org/std/macro.print.html
///
Expand Down

0 comments on commit a53d8cd

Please sign in to comment.