-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix rustdoc run failures by shutting down definitely some lints #51956
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
src/librustdoc/core.rs
Outdated
@@ -235,6 +235,14 @@ pub fn run_core(search_paths: SearchPaths, | |||
let mut sess = session::build_session_( | |||
sessopts, cpath, diagnostic_handler, codemap, | |||
); | |||
|
|||
let shutdown_lints = [lint::builtin::UNUSED_IMPORTS, |
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.
wait that's the wrong way around. I thought you were going to turn on the rustdoc lints even if lints are capped
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 do, but I need to deactivate some lints even if they're enabled.
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.
You can just turn the cap lints back on as it was before
We should discuss this in the compiler meeting, because adding/changing lints in the compiler can now randomly break rustdoc for ppl with any kind of |
eea1564
to
92cda8c
Compare
src/librustdoc/core.rs
Outdated
if lint.name == warnings_lint_name || | ||
lint.name == intra_link_resolution_failure_name || | ||
lint.name == missing_docs { | ||
None |
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.
Took me a while to figure this out. So you are creating a list of all lints except for those you want to keep, and then you set all of them to allow
.
Can you add a comment about this here?
Explanation about why I was confused:
I initially assumed we'd build a list of the lints we want to keep (so essentially vec![warnings_lint_name, intra_link_resolution_failure_name, missing_docs]
, set --cap-lints=allow
and then make sure that cap-lints doesn't override our specific set of lints.
r=me with comment
@bors: r=oli-obk |
📌 Commit 66beb4e has been approved by |
☀️ Test successful - status-appveyor, status-travis |
Nominating for beta backport since this fixes a regression |
Marked as |
Fixes #51661.
cc @oli-obk @arielb1 @eddyb