1
Fork 0

Refactor lint from rustc to rustdoc

This commit is contained in:
Kyle Lin 2023-06-30 18:10:01 +08:00
parent e583318aa8
commit c7369891ba
6 changed files with 519 additions and 102 deletions

View file

@ -1,29 +1,54 @@
// run-rustfix
#![deny(rustdoc::redundant_explicit_links)]
pub fn dummy_target() {}
/// [dummy_target](dummy_target)
//~^ ERROR redundant explicit link target
/// [`dummy_target`](dummy_target)
//~^ ERROR redundant explicit link target
///
/// [Vec](Vec)
//~^ ERROR redundant explicit link target
/// [`Vec`](Vec)
//~^ ERROR redundant explicit link target
/// [Vec](std::vec::Vec)
//~^ ERROR redundant explicit link target
/// [`Vec`](std::vec::Vec)
//~^ ERROR redundant explicit link target
/// [std::vec::Vec](Vec)
//~^ ERROR redundant explicit link target
/// [`std::vec::Vec`](Vec)
//~^ ERROR redundant explicit link target
/// [std::vec::Vec](std::vec::Vec)
//~^ ERROR redundant explicit link target
/// [`std::vec::Vec`](std::vec::Vec)
//~^ ERROR redundant explicit link target
///
/// [usize](usize)
//~^ ERROR redundant explicit link target
/// [`usize`](usize)
//~^ ERROR redundant explicit link target
/// [usize](std::primitive::usize)
//~^ ERROR redundant explicit link target
/// [`usize`](std::primitive::usize)
//~^ ERROR redundant explicit link target
/// [std::primitive::usize](usize)
//~^ ERROR redundant explicit link target
/// [`std::primitive::usize`](usize)
//~^ ERROR redundant explicit link target
/// [std::primitive::usize](std::primitive::usize)
//~^ ERROR redundant explicit link target
/// [`std::primitive::usize`](std::primitive::usize)
pub fn should_warn() {}
//~^ ERROR redundant explicit link target
///
/// [dummy_target](dummy_target) TEXT
//~^ ERROR redundant explicit link target
/// [`dummy_target`](dummy_target) TEXT
//~^ ERROR redundant explicit link target
pub fn should_warn_inline() {}
/// [`Vec<T>`](Vec)
/// [`Vec<T>`](std::vec::Vec)
pub fn should_not_warn() {}
pub fn should_not_warn_inline() {}