Rollup merge of #128307 - ojeda:unescaped_backticks, r=GuillaumeGomez

Clean and enable `rustdoc::unescaped_backticks` for `core/alloc/std/test/proc_macro`

I am not sure if the lint is supposed to be "ready enough" (since it is `allow` by default), but it does catch a couple issues in `core` (`alloc`, `std`, `test` and `proc_macro` are already clean), so I propose making it `warn` in all the crates rendered in the website.

Cc: `@GuillaumeGomez`
This commit is contained in:
Matthias Krüger 2024-07-29 11:42:35 +02:00 committed by GitHub
commit 8f7af88b33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 9 additions and 4 deletions

View File

@ -86,6 +86,7 @@
#![warn(multiple_supertrait_upcastable)] #![warn(multiple_supertrait_upcastable)]
#![allow(internal_features)] #![allow(internal_features)]
#![allow(rustdoc::redundant_explicit_links)] #![allow(rustdoc::redundant_explicit_links)]
#![warn(rustdoc::unescaped_backticks)]
#![deny(ffi_unwind_calls)] #![deny(ffi_unwind_calls)]
// //
// Library features: // Library features:

View File

@ -103,6 +103,7 @@
#![deny(ffi_unwind_calls)] #![deny(ffi_unwind_calls)]
// Do not check link redundancy on bootstraping phase // Do not check link redundancy on bootstraping phase
#![allow(rustdoc::redundant_explicit_links)] #![allow(rustdoc::redundant_explicit_links)]
#![warn(rustdoc::unescaped_backticks)]
// //
// Library features: // Library features:
// tidy-alphabetical-start // tidy-alphabetical-start

View File

@ -282,7 +282,7 @@ fn deref_mut(&mut self) -> &mut T {
/// FIXME(deref_patterns): The precise semantics are undecided; the rough idea is that /// FIXME(deref_patterns): The precise semantics are undecided; the rough idea is that
/// successive calls to `deref`/`deref_mut` without intermediate mutation should be /// successive calls to `deref`/`deref_mut` without intermediate mutation should be
/// idempotent, in the sense that they return the same value as far as pattern-matching /// idempotent, in the sense that they return the same value as far as pattern-matching
/// is concerned. Calls to `deref`/`deref_mut`` must leave the pointer itself likewise /// is concerned. Calls to `deref`/`deref_mut` must leave the pointer itself likewise
/// unchanged. /// unchanged.
#[unstable(feature = "deref_pure_trait", issue = "87121")] #[unstable(feature = "deref_pure_trait", issue = "87121")]
#[lang = "deref_pure"] #[lang = "deref_pure"]

View File

@ -780,7 +780,7 @@ pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T
/// ///
/// The caller must also ensure that the memory the pointer (non-transitively) points to is never /// The caller must also ensure that the memory the pointer (non-transitively) points to is never
/// written to (except inside an `UnsafeCell`) using this pointer or any pointer derived from it. If /// written to (except inside an `UnsafeCell`) using this pointer or any pointer derived from it. If
/// you need to mutate the pointee, use [`from_mut`]`. Specifically, to turn a mutable reference `m: /// you need to mutate the pointee, use [`from_mut`]. Specifically, to turn a mutable reference `m:
/// &mut T` into `*const T`, prefer `from_mut(m).cast_const()` to obtain a pointer that can later be /// &mut T` into `*const T`, prefer `from_mut(m).cast_const()` to obtain a pointer that can later be
/// used for mutation. /// used for mutation.
/// ///

View File

@ -3435,8 +3435,8 @@ pub fn rotate_left(&mut self, mid: usize) {
/// elements of the slice move to the end while the last `k` elements move /// elements of the slice move to the end while the last `k` elements move
/// to the front. /// to the front.
/// ///
/// After calling `rotate_right`, the element previously at index `self.len() /// After calling `rotate_right`, the element previously at index
/// - k` will become the first element in the slice. /// `self.len() - k` will become the first element in the slice.
/// ///
/// # Panics /// # Panics
/// ///

View File

@ -37,6 +37,7 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#![allow(internal_features)] #![allow(internal_features)]
#![deny(ffi_unwind_calls)] #![deny(ffi_unwind_calls)]
#![warn(rustdoc::unescaped_backticks)]
#[unstable(feature = "proc_macro_internals", issue = "27812")] #[unstable(feature = "proc_macro_internals", issue = "27812")]
#[doc(hidden)] #[doc(hidden)]

View File

@ -254,6 +254,7 @@
#![deny(fuzzy_provenance_casts)] #![deny(fuzzy_provenance_casts)]
#![deny(unsafe_op_in_unsafe_fn)] #![deny(unsafe_op_in_unsafe_fn)]
#![allow(rustdoc::redundant_explicit_links)] #![allow(rustdoc::redundant_explicit_links)]
#![warn(rustdoc::unescaped_backticks)]
// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind` // Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
#![deny(ffi_unwind_calls)] #![deny(ffi_unwind_calls)]
// std may use features in a platform-specific way // std may use features in a platform-specific way

View File

@ -24,6 +24,7 @@
#![feature(panic_can_unwind)] #![feature(panic_can_unwind)]
#![feature(test)] #![feature(test)]
#![allow(internal_features)] #![allow(internal_features)]
#![warn(rustdoc::unescaped_backticks)]
pub use cli::TestOpts; pub use cli::TestOpts;