Separate private_intra_doc_links and broken_intra_doc_links into separate lints#77249
Merged
bors merged 2 commits intorust-lang:masterfrom Sep 27, 2020
Merged
Separate private_intra_doc_links and broken_intra_doc_links into separate lints#77249bors merged 2 commits intorust-lang:masterfrom
private_intra_doc_links and broken_intra_doc_links into separate lints#77249bors merged 2 commits intorust-lang:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
3f20adb to
3fdad10
Compare
Manishearth
approved these changes
Sep 27, 2020
…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.
3fdad10 to
51aab59
Compare
Member
|
@bors r+ |
Collaborator
|
📌 Commit 51aab59d93778d4afd5dbe01b8e901a2847b092c has been approved by |
Member
Author
|
Oh lol it tried to run the example as a doc-test. Let me try ignoring it. |
51aab59 to
80ffaed
Compare
Member
Author
|
@bors r=Manishearth |
Collaborator
|
📌 Commit 80ffaed has been approved by |
This was referenced Sep 27, 2020
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 27, 2020
…as-schievink Rollup of 7 pull requests Successful merges: - rust-lang#76839 (Add asm! support for MIPS) - rust-lang#77203 (Check for missing const-stability attributes in `rustc_passes`) - rust-lang#77249 (Separate `private_intra_doc_links` and `broken_intra_doc_links` into separate lints) - rust-lang#77252 (reduce overlong line) - rust-lang#77256 (Fix typo in ExpnData documentation) - rust-lang#77262 (Remove duplicate comment) - rust-lang#77263 (Clean up trivial if let) Failed merges: r? `@ghost`
|
It seems it is not possible to |
Member
Author
Well that's odd. |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Nov 6, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? `@Manishearth` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this pull request
Nov 7, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? ``@Manishearth`` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this pull request
Nov 7, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? ```@Manishearth``` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this pull request
Nov 7, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? ````@Manishearth```` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this pull request
Nov 7, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? `````@Manishearth````` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Nov 8, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? ``````@Manishearth`````` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Nov 8, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? ```````@Manishearth``````` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Nov 9, 2020
Recognize `private_intra_doc_links` as a lint Previously, trying to allow this would give another error! ``` warning: unknown lint: `private_intra_doc_links` --> private.rs:1:10 | 1 | #![allow(private_intra_doc_links)] | ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links` | = note: `#[warn(unknown_lints)]` on by default warning: public documentation for `DocMe` links to private item `DontDocMe` --> private.rs:2:11 | 2 | /// docs [DontDocMe] | ^^^^^^^^^ this item is private | = note: `#[warn(private_intra_doc_links)]` on by default = note: this link will resolve properly if you pass `--document-private-items` ``` Fixes the issue found in rust-lang#77249 (comment). r? ````````@Manishearth```````` Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is not ideal because it means
deny(broken_intra_doc_links)willno longer
deny(private_intra_doc_links). However, it can't be fixedwith a new lint group, because
brokenis already in therustdoclintgroup; there would need to be a way to nest groups somehow.
This also removes the early
returnso that the link will be generatedeven though it gives a warning.
r? @Manishearth
cc @ecstatic-morse (#77242 (comment))