Skip to content

Commit 15ece93

Browse files
committed
relax redundancy constraint
1 parent 4896fc0 commit 15ece93

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

library/alloc/src/sync.rs

+2-4
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
///

src/librustdoc/passes/lint/redundant_explicit_links.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn check_redundant_explicit_link<'md>(
6868
let link_data = collect_link_data(&mut offset_iter);
6969

7070
if let Some(resolvable_link) = link_data.resolvable_link.as_ref() {
71-
if &link_data.display_link != resolvable_link {
71+
if &link_data.display_link.replace("`", "") != resolvable_link {
7272
// Skips if display link does not match to actual
7373
// resolvable link, usually happens if display link
7474
// has several segments, e.g.
@@ -82,11 +82,6 @@ fn check_redundant_explicit_link<'md>(
8282
let explicit_len = explicit_link.len();
8383
let display_len = display_link.len();
8484

85-
if explicit_len == display_len && explicit_link != display_link {
86-
// Skips if they possibly have no relativity.
87-
continue;
88-
}
89-
9085
if (explicit_len >= display_len
9186
&& &explicit_link[(explicit_len - display_len)..] == display_link)
9287
|| (display_len >= explicit_len

0 commit comments

Comments
 (0)