diff options
| author | Kyle Lin <minecraft.kyle.train@gmail.com> | 2023-06-29 13:24:09 +0800 |
|---|---|---|
| committer | Kyle Lin <minecraft.kyle.train@gmail.com> | 2023-08-18 15:19:08 +0800 |
| commit | da582a71d2c19a2ded0c45f464cb64c9544c26eb (patch) | |
| tree | 51403682d01f15dbdc60e0097500ae632e3bdac2 /src/doc | |
| parent | b1d232a6da800b26f18d79a0340436fa4aec7327 (diff) | |
| download | rust-da582a71d2c19a2ded0c45f464cb64c9544c26eb.tar.gz rust-da582a71d2c19a2ded0c45f464cb64c9544c26eb.zip | |
Add warn level lint `redundant_explicit_links`
- Currently it will panic due to the resolution's caching issue
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustdoc/src/lints.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/lints.md b/src/doc/rustdoc/src/lints.md index fd57b079644..fe06b303e72 100644 --- a/src/doc/rustdoc/src/lints.md +++ b/src/doc/rustdoc/src/lints.md @@ -412,3 +412,25 @@ help: if you meant to use a literal backtick, escape it warning: 1 warning emitted ``` + +## `redundant_explicit_links` + +This lint is **warned by default**. It detects explicit links that are same +as computed automatic links. +This usually means the explicit links is removeable. For example: + +```rust +#![warn(rustdoc::redundant_explicit_links)] + +pub fn dummy_target() {} // note: unnecessary - warns by default. + +/// [`dummy_target`](dummy_target) +/// [dummy_target](dummy_target) +pub fn c() {} +``` + +Which will give: + +```text + +``` |
