diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-29 11:42:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-29 11:42:35 +0200 |
| commit | 8f7af88b33771ab5ec92a2a767a97a068f2ea17b (patch) | |
| tree | 0d0cf8ae3c4dc44c69f9ac6051b224b89d7d92a6 | |
| parent | d73decdaadbc6cc0ca95ab66e3d1d17d4f3bb062 (diff) | |
| parent | dc815df1e1dc8c37956e41274c3276d053c271da (diff) | |
| download | rust-8f7af88b33771ab5ec92a2a767a97a068f2ea17b.tar.gz rust-8f7af88b33771ab5ec92a2a767a97a068f2ea17b.zip | |
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`
| -rw-r--r-- | library/alloc/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/core/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/core/src/ops/deref.rs | 2 | ||||
| -rw-r--r-- | library/core/src/ptr/mod.rs | 2 | ||||
| -rw-r--r-- | library/core/src/slice/mod.rs | 4 | ||||
| -rw-r--r-- | library/proc_macro/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/std/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/test/src/lib.rs | 1 |
8 files changed, 9 insertions, 4 deletions
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 3b039786eb5..6c585946050 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -86,6 +86,7 @@ #![warn(multiple_supertrait_upcastable)] #![allow(internal_features)] #![allow(rustdoc::redundant_explicit_links)] +#![warn(rustdoc::unescaped_backticks)] #![deny(ffi_unwind_calls)] // // Library features: diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index e8f08db9416..a3eca34a35c 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -103,6 +103,7 @@ #![deny(ffi_unwind_calls)] // Do not check link redundancy on bootstraping phase #![allow(rustdoc::redundant_explicit_links)] +#![warn(rustdoc::unescaped_backticks)] // // Library features: // tidy-alphabetical-start diff --git a/library/core/src/ops/deref.rs b/library/core/src/ops/deref.rs index 9849410d484..f0d2c761ef3 100644 --- a/library/core/src/ops/deref.rs +++ b/library/core/src/ops/deref.rs @@ -282,7 +282,7 @@ impl<T: ?Sized> DerefMut for &mut T { /// FIXME(deref_patterns): The precise semantics are undecided; the rough idea is that /// 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 -/// 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. #[unstable(feature = "deref_pure_trait", issue = "87121")] #[lang = "deref_pure"] diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 9921f5d70c0..25d8f4a0adb 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -780,7 +780,7 @@ where /// /// 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 -/// 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 /// used for mutation. /// diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 64edaa2f034..0b0a416ea24 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -3435,8 +3435,8 @@ impl<T> [T] { /// elements of the slice move to the end while the last `k` elements move /// to the front. /// - /// After calling `rotate_right`, the element previously at index `self.len() - /// - k` will become the first element in the slice. + /// After calling `rotate_right`, the element previously at index + /// `self.len() - k` will become the first element in the slice. /// /// # Panics /// diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 06db4837adf..c271ac18706 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -37,6 +37,7 @@ #![recursion_limit = "256"] #![allow(internal_features)] #![deny(ffi_unwind_calls)] +#![warn(rustdoc::unescaped_backticks)] #[unstable(feature = "proc_macro_internals", issue = "27812")] #[doc(hidden)] diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 6dc74728dfd..ee6f5a6f3c0 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -254,6 +254,7 @@ #![deny(fuzzy_provenance_casts)] #![deny(unsafe_op_in_unsafe_fn)] #![allow(rustdoc::redundant_explicit_links)] +#![warn(rustdoc::unescaped_backticks)] // Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind` #![deny(ffi_unwind_calls)] // std may use features in a platform-specific way diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs index 516e3f1300e..632f8d161af 100644 --- a/library/test/src/lib.rs +++ b/library/test/src/lib.rs @@ -24,6 +24,7 @@ #![feature(panic_can_unwind)] #![feature(test)] #![allow(internal_features)] +#![warn(rustdoc::unescaped_backticks)] pub use cli::TestOpts; |
