[2/3] rust: print: use explicit link in documentation

Message ID 20231005210556.466856-3-ojeda@kernel.org
State New
Headers
Series Rust 1.73.0 upgrade |

Commit Message

Miguel Ojeda Oct. 5, 2023, 9:05 p.m. UTC
  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.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/kernel/print.rs | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Martin Rodriguez Reboredo Oct. 5, 2023, 9:30 p.m. UTC | #1
On 10/5/23 18:05, Miguel Ojeda wrote:
> 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.
> 
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---
> [...]
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
  
Finn Behrens Oct. 6, 2023, 8:14 a.m. UTC | #2
On 5 Oct 2023, at 23:05, Miguel Ojeda wrote:

> 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.
>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---

Reviewed-by: Finn Behrens <me@kloenk.dev>
  
Alice Ryhl Oct. 6, 2023, 8:52 a.m. UTC | #3
On Thu, Oct 5, 2023 at 11:06 PM Miguel Ojeda <ojeda@kernel.org> wrote:
> 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.
>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
  
Vincenzo Palazzo Oct. 9, 2023, 8:48 a.m. UTC | #4
> 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.
>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  

Patch

diff --git a/rust/kernel/print.rs b/rust/kernel/print.rs
index 8009184bf6d7..f48926e3e9fe 100644
--- a/rust/kernel/print.rs
+++ b/rust/kernel/print.rs
@@ -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
 ///