-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate private_intra_doc_links
and broken_intra_doc_links
into separate lints
#77249
Merged
Conversation
This file contains 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
jyn514
added
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
A-visibility
Area: Visibility / privacy
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
labels
Sep 27, 2020
This comment has been minimized.
This comment has been minimized.
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Sep 27, 2020
jyn514
added
the
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
label
Sep 27, 2020
jyn514
force-pushed
the
private-links
branch
2 times, most recently
from
September 27, 2020 04:10
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.
jyn514
force-pushed
the
private-links
branch
from
September 27, 2020 14:07
3fdad10
to
51aab59
Compare
@bors r+ |
📌 Commit 51aab59d93778d4afd5dbe01b8e901a2847b092c has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Sep 27, 2020
Oh lol it tried to run the example as a doc-test.
Let me try ignoring it. |
jyn514
force-pushed
the
private-links
branch
from
September 27, 2020 14:44
51aab59
to
80ffaed
Compare
@bors r=Manishearth |
📌 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 |
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-visibility
Area: Visibility / privacy
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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
broken
is already in therustdoc
lintgroup; there would need to be a way to nest groups somehow.
This also removes the early
return
so that the link will be generatedeven though it gives a warning.
r? @Manishearth
cc @ecstatic-morse (#77242 (comment))