Skip to content

Commit 1c6b237

Browse files
committed
add more tests
1 parent 65e24a5 commit 1c6b237

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ impl LinkCollector<'_, '_> {
14211421
// For reference-style links we want to report only one error so unsuccessful
14221422
// resolutions are cached, for other links we want to report an error every
14231423
// time so they are not cached.
1424-
matches!(ori_link.kind, LinkType::Reference | LinkType::Shortcut),
1424+
matches!(ori_link.kind, LinkType::Reference),
14251425
) else {
14261426
return;
14271427
};

tests/rustdoc-ui/lints/redundant_explicit_links.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@ pub fn dummy_target() {}
44

55
/// [dummy_target](dummy_target)
66
/// [`dummy_target`](dummy_target)
7+
///
78
/// [Vec](Vec)
89
/// [`Vec`](Vec)
910
/// [Vec](std::vec::Vec)
1011
/// [`Vec`](std::vec::Vec)
12+
/// [std::vec::Vec](Vec)
13+
/// [`std::vec::Vec`](Vec)
1114
/// [std::vec::Vec](std::vec::Vec)
1215
/// [`std::vec::Vec`](std::vec::Vec)
16+
///
1317
/// [usize](usize)
1418
/// [`usize`](usize)
19+
/// [usize](std::primitive::usize)
20+
/// [`usize`](std::primitive::usize)
1521
/// [std::primitive::usize](usize)
1622
/// [`std::primitive::usize`](usize)
23+
/// [std::primitive::usize](std::primitive::usize)
24+
/// [`std::primitive::usize`](std::primitive::usize)
1725
pub fn should_warn() {}
1826

1927
/// [`Vec<T>`](Vec)

0 commit comments

Comments
 (0)