Point out failing never obligation for DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK#126367
Conversation
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
| && let never_errors = remaining_errors_if_fallback_to(self.tcx.types.never) | ||
| && !never_errors.is_empty() | ||
| && let mut never_errors = remaining_errors_if_fallback_to(self.tcx.types.never) | ||
| && let [ref mut never_error, ..] = never_errors.as_mut_slice() |
There was a problem hiding this comment.
Do you think we should lint individually on each failing obligation?
Or maybe I should make it a subdiagnostic so we can have multiple of them?
If we print out >1, I should probably do some deduplication like we do for real fulfillment errors 🤔
There was a problem hiding this comment.
I think ideally we should print out all the errors, but maybe it will be too noisy, idk. This PR as is seems like a good first step/clear improvement.
| && let never_errors = remaining_errors_if_fallback_to(self.tcx.types.never) | ||
| && !never_errors.is_empty() | ||
| && let mut never_errors = remaining_errors_if_fallback_to(self.tcx.types.never) | ||
| && let [ref mut never_error, ..] = never_errors.as_mut_slice() |
There was a problem hiding this comment.
I think ideally we should print out all the errors, but maybe it will be too noisy, idk. This PR as is seems like a good first step/clear improvement.
| hir_typeck_ctor_is_private = tuple struct constructor `{$def}` is private | ||
|
|
||
| hir_typeck_dependency_on_unit_never_type_fallback = this function depends on never type fallback being `()` | ||
| .note = in edition 2024, the requirement `{$obligation}` will fail |
There was a problem hiding this comment.
maybe we can mention somehow that we plan to break this on all editions eventually?
There was a problem hiding this comment.
do you have an opinion on the wording?
| .note = in edition 2024, the requirement `{$obligation}` will fail | |
| .note = in edition 2024, the requirement `{$obligation}` will fail, and eventually this will fail everywhere |
seems awkward, and I have no idea what a better wording could be 🤔
|
☔ The latest upstream changes (presumably #125289) made this pull request unmergeable. Please resolve the merge conflicts. |
05ecac2 to
fdd90db
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
WaffleLapkin
left a comment
There was a problem hiding this comment.
There are reports from users hitting the warning, I would like them to see at least some explanation for why they hit it, so we should merge this asap.
This is a clear improvement and we can delay more improvements to follow-ups.
r=me with green CI
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#126354 (Use `Variance` glob imported variants everywhere) - rust-lang#126367 (Point out failing never obligation for `DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK`) - rust-lang#126469 (MIR Shl/Shr: the offset can be computed with rem_euclid) - rust-lang#126471 (Use a consistent way to filter out bounds instead of splitting it into three places) - rust-lang#126472 (build `libcxx-version` only when it doesn't exist) - rust-lang#126497 (delegation: Fix hygiene for `self`) - rust-lang#126501 (make bors ignore comments in PR template) - rust-lang#126509 (std: suggest OnceLock over Once) - rust-lang#126512 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#126367 - compiler-errors:point-out-failing-never-obligation, r=WaffleLapkin Point out failing never obligation for `DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK` Based on top of rust-lang#125289, so just need to look at the last commit. r? `@WaffleLapkin`
Based on top of #125289, so just need to look at the last commit.
r? @WaffleLapkin