-
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
Remove FIXME since there is nothing to be fixed #89907
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.
Haven't looked at the test case, but the abort_if_errors() call looks right.
What does this mean? Do you mean that if there was a rustc error, no rustdoc errors will be reported until the rustc error is fixed? |
Exactly. For example, in the test I splitted in two parts, it's because the rustdoc lints weren't emitted because we aborted before them. |
rustc itself generally deduplicates errors, that's just turned off for UI tests. Does this duplication reproduce outside of UI tests? If not, it may be preferable to avoid the early abort, which we're generally trying to move away from where possible. |
src/librustdoc/core.rs
Outdated
@@ -343,6 +343,7 @@ crate fn run_global_ctxt( | |||
let access_levels = AccessLevels { | |||
map: tcx.privacy_access_levels(()).map.iter().map(|(k, v)| (k.to_def_id(), *v)).collect(), | |||
}; | |||
tcx.sess.abort_if_errors(); |
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.
tcx.sess.abort_if_errors(); | |
// Avoid emitting duplicate errors later on. | |
tcx.sess.abort_if_errors(); |
error: missing documentation for a function | ||
--> $DIR/check-fail.rs:11:1 | ||
error: missing documentation for the crate | ||
--> $DIR/check-fail.rs:3:1 |
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 think this is unrelated to this change, but why did it not emit missing_docs
for the crate before?
Seems like the situation is this:
Before
- function
After
- crate
- function
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.
The rustc lint passes come afterwards (unless I missed something?).
Huh, you're right; it doesn't seem to reproduce outside of UI tests. I thought I had found it "in the wild", but perhaps not. |
I guess this PR and associated issue can be closed then? |
Or maybe just repurpose this PR so it removes the FIXME in the test. |
As you prefer. I personally don't have preference here. Just like the borrow checker comes after the other checks, I don't see it abnormal to have the rustdoc checks only if rustc is happy. |
It'd be better to have as many errors as possible be reported in one build, as long as none are spurious. So I don't see why we should add this early abort, especially if T-compiler (or whichever team Mark was referring to) is moving away from it. The borrow checker not running if earlier stages failed is just a technical limitation IIUC. |
Then I'll update the PR to remove the FIXME. :) |
94ff696
to
8d9dbf7
Compare
And done! |
r=me with the commit message amended to include something like this:
|
The errors are deduplicated when displayed to users. They only appear multiple times in UI tests.
8d9dbf7
to
7bad85e
Compare
Done! |
Thanks! @bors r+ rollup |
📌 Commit 7bad85e has been approved by |
629ec2a
to
7bad85e
Compare
@bors r+ |
📌 Commit 7bad85e has been approved by |
…s, r=camelid Remove FIXME since there is nothing to be fixed Resolves rust-lang#88593. The errors are deduplicated when displayed to users. They only appear multiple times in UI tests. cc `@jyn514` r? `@camelid`
Rollup of 7 pull requests Successful merges: - rust-lang#89507 (Add `#[repr(i8)]` to `Ordering`) - rust-lang#89849 (CI: Selecting the Xcode version no longer needed with the macos-11 runners.) - rust-lang#89886 (Update the wasi-libc built with the wasm32-wasi target) - rust-lang#89907 (Remove FIXME since there is nothing to be fixed) - rust-lang#89943 (clippy::complexity fixes) - rust-lang#89953 (Make Option::as_mut const) - rust-lang#89958 (Correct small typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Resolves #88593.
The errors are deduplicated when displayed to users. They only appear
multiple times in UI tests.
cc @jyn514
r? @camelid