Separate private_intra_doc_links
and broken_intra_doc_links
into separate lints
This is not ideal because it means `deny(broken_intra_doc_links)` will no longer `deny(private_intra_doc_links)`. However, it can't be fixed with a new lint group, because `broken` is already in the `rustdoc` lint group; there would need to be a way to nest groups somehow. This also removes the early `return` so that the link will be generated even though it gives a warning.
This commit is contained in:
parent
b8363295d5
commit
03d8be0896
8 changed files with 35 additions and 12 deletions
|
@ -1826,6 +1826,17 @@ declare_lint! {
|
|||
"failures in resolving intra-doc link targets"
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
/// This is a subset of `broken_intra_doc_links` that warns when linking from
|
||||
/// a public item to a private one. This is a `rustdoc` only lint, see the
|
||||
/// documentation in the [rustdoc book].
|
||||
///
|
||||
/// [rustdoc book]: ../../../rustdoc/lints.html#broken_intra_doc_links
|
||||
pub PRIVATE_INTRA_DOC_LINKS,
|
||||
Warn,
|
||||
"linking from a public item to a private one"
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
/// The `invalid_codeblock_attributes` lint detects code block attributes
|
||||
/// in documentation examples that have potentially mis-typed values. This
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue