Skip to content
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 missing_doc_code_examples from intra-doc links #74855

Merged
merged 3 commits into from
Jul 28, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jul 28, 2020

These two lints have no relation other than both being nightly-only.
This allows stabilizing intra-doc links without stabilizing missing_doc_code_examples.

Fixes one of the issues spotted by @ollie27 in #74430 (comment).

r? @Manishearth

@rust-highfive
Copy link
Collaborator

Some changes occurred in intra-doc-links.

cc @jyn514

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 28, 2020
@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 28, 2020
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. Would be nice to have some comments saying why the pass is badly named right now until we fix it.

(Perhaps linking to an issue to properly fix the pass)

@@ -30,7 +30,7 @@ impl<'a, 'tcx> DocFolder for PrivateItemDocTestLinter<'a, 'tcx> {
let cx = self.cx;
let dox = item.attrs.collapsed_doc_value().unwrap_or_else(String::new);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably rename this pass and module.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow - this pass still looks for doc-tests in private items, it just also looks for public items as well. Were you imagining something like doc_test_lints.rs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the file, moved look_for_tests to this file, and added a short doc-comment explaining that it runs two different lints.

jyn514 added 2 commits July 27, 2020 22:54
These two lints have no relation other than both being nightly-only.
This allows stabilizing intra-doc links without stabilizing
missing_doc_code_examples.
@Manishearth
Copy link
Member

@bors r+

We should file a followup about regularizing the lint names, renaming the pass, and making both of these nightly-only.

@bors
Copy link
Contributor

bors commented Jul 28, 2020

📌 Commit c3f5556 has been approved by Manishearth

@bors 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 Jul 28, 2020
@bors
Copy link
Contributor

bors commented Jul 28, 2020

⌛ Testing commit c3f5556 with merge 1f5d69d...

@bors
Copy link
Contributor

bors commented Jul 28, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Manishearth
Pushing 1f5d69d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 28, 2020
@bors bors merged commit 1f5d69d into rust-lang:master Jul 28, 2020
@jyn514 jyn514 deleted the separate-lints branch July 28, 2020 12:08
jyn514 added a commit to jyn514/rust that referenced this pull request Aug 26, 2020
This fixes a regression introduced in
rust-lang#74855.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Aug 26, 2020
Fix swapped stability attributes for rustdoc lints

This fixes a regression introduced in rust-lang#74855. Previously, `missing_doc_code_examples` would be run on stable and `private_doc_tests` would only be run on nightly. Now, it correctly does the reverse.
Closes rust-lang#75951.
r? @ehuss
jyn514 added a commit to jyn514/rust that referenced this pull request Aug 28, 2020
This fixes a regression introduced in
rust-lang#74855.
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants