-
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
Fix lints handling in rustdoc #60908
Conversation
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.
just a nit, then this lgtm
src/librustdoc/passes/mod.rs
Outdated
@@ -336,18 +338,22 @@ pub fn look_for_tests<'tcx>( | |||
find_testable_code(&dox, &mut tests, ErrorCodes::No); | |||
|
|||
if check_missing_code == true && tests.found_tests == 0 { | |||
let mut sp = span_of_attrs(&item.attrs); |
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.
this + the if below can be
let sp = span_of_attrs(&item.attrs).substitute_dummy(item.source.span());
https://doc.rust-lang.org/nightly/nightly-rustc/syntax_pos/struct.Span.html#method.substitute_dummy
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.
Oh awesome!
Updated! Let's just wait for CI first, a test is incomplete, I can't make it run locally so I'm waiting for CI to give me the stderr. :-° |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@pietroalbini Any idea why we don't have highfive starting rustdoc UI test in here? :'( |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I don't see any exception, I'll try to investigate a bit later. |
Thanks! |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I fixed the tests and also fixed the tests not running locally for some reasons... ping @oli-obk |
Please mention in the commit description or the PR description what part of the issue is actually being fixed |
I updated the first comment of the PR. Do you think this is enough or should I add something else? |
@bors r+ |
📌 Commit 6063777 has been approved by |
Fix lints handling in rustdoc Part of rust-lang#60664: now lints are handled just like any other lints you would setup in rustc. Still remains to handle `missing code examples` and `missing_docs` as part of the same group. r? @oli-obk
Rollup of 6 pull requests Successful merges: - #60590 (Test interaction of unions with non-zero/niche-filling optimization) - #60745 (Perform constant propagation into terminators) - #60895 (Enable thumbv7a-pc-windows-msvc target build end to end in rust/master) - #60908 (Fix lints handling in rustdoc) - #60960 (Stop using gensyms in HIR lowering) - #60962 (Fix data types indication) Failed merges: r? @ghost
☔ The latest upstream changes (presumably #60969) made this pull request unmergeable. Please resolve the merge conflicts. |
Part of #60664: now lints are handled just like any other lints you would setup in rustc. Still remains to handle
missing code examples
andmissing_docs
as part of the same group.r? @oli-obk