diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-09-26 21:27:55 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-09-27 09:58:29 -0400 |
| commit | 03d8be08967e3fbc358bc9fe9fad9a06ddabb17f (patch) | |
| tree | e3c5a9521880e41e7aed5455b4af8c1347919168 /compiler/rustc_session/src | |
| parent | b8363295d555494bbaa119eba8b16a3057e6728c (diff) | |
| download | rust-03d8be08967e3fbc358bc9fe9fad9a06ddabb17f.tar.gz rust-03d8be08967e3fbc358bc9fe9fad9a06ddabb17f.zip | |
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.
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/lint/builtin.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/lint/builtin.rs b/compiler/rustc_session/src/lint/builtin.rs index 13a4057a35b..8c3218b8e80 100644 --- a/compiler/rustc_session/src/lint/builtin.rs +++ b/compiler/rustc_session/src/lint/builtin.rs @@ -1827,6 +1827,17 @@ declare_lint! { } 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 /// is a `rustdoc` only lint, see the documentation in the [rustdoc book]. |
