-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Deny warnings in rustdoc non-UI tests #91275
Conversation
These warnings were silently ignored since they did not appear in a `.stderr` file and did not fail the test. With this change, warnings in tests are denied, causing the tests to fail if they have warnings. I will fix all the warnings that are now test failures next.
If there are any places where you are unclear what warning is being fixed, just ask and I will try to explain :) |
This comment has been minimized.
This comment has been minimized.
a0f3afa
to
51f4ebf
Compare
This comment has been minimized.
This comment has been minimized.
#![feature(rustdoc_internals)] | ||
|
||
// FIXME: this test doesn't test anything | ||
|
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.
Note that this file is included as part of another test, so the feature gate is invalid and the note is incorrect. But this confusing include!
behavior is removed in a later commit.
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 is awesome, thank you for fixing it!
Looks good once you fix the one failing test :) |
51f4ebf
to
cdba477
Compare
@bors r=jyn514 rollup=iffy (because it may conflict with PRs adding or changing tests) |
📌 Commit cdba47703e9be6161a09d803c8b7dd10d2f17bf2 has been approved by |
This comment has been minimized.
This comment has been minimized.
⌛ Testing commit cdba47703e9be6161a09d803c8b7dd10d2f17bf2 with merge ee203ec0d150905a211e75f74d85ef360ce54d72... |
GitHub Actions incident appears to have caused problems for the build. @bors retry |
⌛ Testing commit cdba47703e9be6161a09d803c8b7dd10d2f17bf2 with merge 259dce145ffdb4f8b6a6157c4cfa1ffaa6a42e0a... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Added @bors r=jyn514 |
@bors r- |
Now that compiletest denies warnings in these tests, they need fixing!
Using `include!` shouldn't affect the test. It was only added because: > I replicated how it was performed in libstd. Since it's the main > target of this fix, I thought it was the best way. <https://github.com/rust-lang/rust/pull/52827/files#r207647331> But it's unnecessary and adds unnecessary indirection.
f2530a8
to
ac88bb7
Compare
Updated line numbers in stderr file. @bors r=jyn514 |
📌 Commit ac88bb7 has been approved by |
⌛ Testing commit ac88bb7 with merge 2c07507b68c29937d70ee423f6766369fd3324a0... |
💥 Test timed out |
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (3c51718): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
These warnings were silently ignored since they did not appear in a
.stderr
file and did not fail the test. With this change, warnings intests are denied, causing the tests to fail if they have warnings.
This change has already led me to find a bug in rustdoc (#91274) and a
useless test (
src/test/rustdoc/primitive/primitive-generic-impl.rs
,though its uselessness is unrelated to its warnings).
r? @jyn514