-
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
Add command line lint manipulation in rustdoc #51732
Conversation
ping from triage @QuietMisdreavus will you have time to review this PR in the near future? |
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.
Looks good, thanks so much! Just a couple style things.
@@ -213,7 +217,7 @@ pub fn run_core(search_paths: SearchPaths, | |||
} else { | |||
vec![] | |||
}, | |||
lint_cap: Some(lint::Forbid), | |||
lint_cap: Some(lint_cap.unwrap_or_else(|| lint::Forbid)), |
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 leave this as None
if you're going to default it to Forbid
anyway; rustc will do this unwrap itself later on.
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.
No, I did at first but didn't get the expected result.
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.
Huh, weird, I didn't realize it was unwrapped anywhere other than where it was used.
src/librustdoc/lib.rs
Outdated
"cap-lints", | ||
"Set the most restrictive lint level. \ | ||
More restrictive lints are capped at this \ | ||
level. Byt default, it is at `forbid` level.", |
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.
Typo, "byt default"
77dd609
to
e221be8
Compare
r=me pending travis |
@bors: r=QuietMisdreavus |
📌 Commit e221be8 has been approved by |
…isdreavus Add command line lint manipulation in rustdoc Fixes #50082. r? @QuietMisdreavus
☀️ Test successful - status-appveyor, status-travis |
stabilize lint handling in rustdoc When #51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period. Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them. r? @rust-lang/rustdoc
Fixes #50082.
r? @QuietMisdreavus