]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rust: enable `rustdoc::unescaped_backticks` lint
authorMiguel Ojeda <ojeda@kernel.org>
Fri, 7 Mar 2025 22:49:15 +0000 (23:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:01:41 +0000 (13:01 +0100)
commit85ad4713660f475f366bd73c951e21656758fcc3
tree3703229ee953744d29e632c52a28ce94961ae316
parentc6447d4d83f577132ed267332c860ff9b5332652
rust: enable `rustdoc::unescaped_backticks` lint

commit bef83245f5ed434932aaf07f890142b576dc5d85 upstream.

In Rust 1.71.0, `rustdoc` added the `unescaped_backticks` lint, which
detects what are typically typos in Markdown formatting regarding inline
code [1], e.g. from the Rust standard library:

    /// ... to `deref`/`deref_mut`` must ...

    /// ... use [`from_mut`]`. Specifically, ...

It does not seem to have almost any false positives, from the experience
of enabling it in the Rust standard library [2], which will be checked
starting with Rust 1.82.0. The maintainers also confirmed it is ready
to be used.

Thus enable it.

Link: https://doc.rust-lang.org/rustdoc/lints.html#unescaped_backticks
Link: https://github.com/rust-lang/rust/pull/128307
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Tested-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20240904204347.168520-9-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile
rust/Makefile