Skip to content

Commit 7030d42

Browse files
committed
Auto merge of rust-lang#113167 - ChAoSUnItY:redundant_explicit_link, r=GuillaumeGomez
rustdoc: Add lint `redundant_explicit_links` Closes rust-lang#87799. - Lint warns by default - Reworks link parser to cache original link's display text r? `@jyn514`
2 parents 9679aab + 1595d60 commit 7030d42

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

alloc/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
#![allow(explicit_outlives_requirements)]
9090
#![warn(multiple_supertrait_upcastable)]
9191
#![cfg_attr(not(bootstrap), allow(internal_features))]
92+
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
9293
//
9394
// Library features:
9495
// tidy-alphabetical-start

alloc/src/sync.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ macro_rules! acquire {
153153
///
154154
/// ## `Deref` behavior
155155
///
156-
/// `Arc<T>` automatically dereferences to `T` (via the [`Deref`][deref] trait),
156+
/// `Arc<T>` automatically dereferences to `T` (via the [`Deref`] trait),
157157
/// so you can call `T`'s methods on a value of type `Arc<T>`. To avoid name
158158
/// clashes with `T`'s methods, the methods of `Arc<T>` itself are associated
159159
/// functions, called using [fully qualified syntax]:
@@ -187,7 +187,6 @@ macro_rules! acquire {
187187
/// [mutex]: ../../std/sync/struct.Mutex.html
188188
/// [rwlock]: ../../std/sync/struct.RwLock.html
189189
/// [atomic]: core::sync::atomic
190-
/// [deref]: core::ops::Deref
191190
/// [downgrade]: Arc::downgrade
192191
/// [upgrade]: Weak::upgrade
193192
/// [RefCell\<T>]: core::cell::RefCell
@@ -1495,7 +1494,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
14951494
/// alignment as `T`. This is trivially true if `U` is `T`.
14961495
/// Note that if `U` is not `T` but has the same size and alignment, this is
14971496
/// basically like transmuting references of different types. See
1498-
/// [`mem::transmute`][transmute] for more information on what
1497+
/// [`mem::transmute`] for more information on what
14991498
/// restrictions apply in this case.
15001499
///
15011500
/// The raw pointer must point to a block of memory allocated by `alloc`
@@ -1507,7 +1506,6 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
15071506
/// even if the returned `Arc<T>` is never accessed.
15081507
///
15091508
/// [into_raw]: Arc::into_raw
1510-
/// [transmute]: core::mem::transmute
15111509
///
15121510
/// # Examples
15131511
///

core/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@
9797
#![allow(incomplete_features)]
9898
#![warn(multiple_supertrait_upcastable)]
9999
#![cfg_attr(not(bootstrap), allow(internal_features))]
100+
// Do not check link redundancy on bootstraping phase
101+
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
100102
//
101103
// Library features:
102104
// tidy-alphabetical-start

std/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
#![cfg_attr(not(bootstrap), allow(internal_features))]
224224
#![deny(rustc::existing_doc_keyword)]
225225
#![deny(fuzzy_provenance_casts)]
226+
#![cfg_attr(not(bootstrap), allow(rustdoc::redundant_explicit_links))]
226227
// Ensure that std can be linked against panic_abort despite compiled with `-C panic=unwind`
227228
#![deny(ffi_unwind_calls)]
228229
// std may use features in a platform-specific way

0 commit comments

Comments
 (0)