-
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
Report number of delayed bugs properly with -Ztreat-err-as-bug
#101471
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
6bff036
to
0ca4271
Compare
0ca4271
to
38935bb
Compare
self.flags.treat_err_as_bug.map(|c| c.get()).unwrap_or(0), | ||
) { | ||
(1, 1) => panic!("aborting due to `-Z treat-err-as-bug=1`"), | ||
(0 | 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.
This will literally never trigger -- because if the err count is 0 or 1, then for self.treat_err_as_bug()
to have evaluated to true, then we must have -Ztreat-err-as-bug=1
, which would have matched the previous arm.
aaaa I literally hit that last week. Thank you! @bors r+ rollup |
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#101357 (Include enum path in variant suggestion) - rust-lang#101434 (Update `SessionDiagnostic::into_diagnostic` to take `Handler` instead of `ParseSess`) - rust-lang#101445 (Suggest introducing an explicit lifetime if it does not exist) - rust-lang#101457 (Recover from using `;` as separator between fields) - rust-lang#101462 (Rustdoc-Json: Store Variant Fields as their own item.) - rust-lang#101471 (Report number of delayed bugs properly with `-Ztreat-err-as-bug`) - rust-lang#101473 (Add more size assertions for MIR types.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Report the number of delayed bugs that went into the
-Ztreat-errr-as-bug=N
being triggered, even if we don't count it in the err_count in regular diagnostic output.Sometimes we have a session that creates a few diagnostics, perhaps: Error, Delay bug, Error, then Delay bug.
If I ran
-Ztreat-err-as-bug=3
, then I will now see "aborting after 2 errors and 1 delayed bugs" instead of just "after 2 errors" which is confusing since I passed3
.