-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
Some changes occurred in intra-doc-links. cc @jyn514 |
There was a problem hiding this 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
These two lints have no relation other than both being nightly-only. This allows stabilizing intra-doc links without stabilizing missing_doc_code_examples.
@bors r+ We should file a followup about regularizing the lint names, renaming the pass, and making both of these nightly-only. |
📌 Commit c3f5556 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
This fixes a regression introduced in rust-lang#74855.
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
This fixes a regression introduced in rust-lang#74855.
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