Point out failing never obligation for DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK
by compiler-errors · Pull Request #126367 · rust-lang/rust (original) (raw)
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
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() |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🤔
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -45,6 +45,7 @@ hir_typeck_convert_using_method = try using `{$sugg}` to convert `{$found}` to ` |
---|
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 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can mention somehow that we plan to break this on all editions eventually?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 job x86_64-gnu-tools
failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
.......... (120/124)
...F (124/124)
/checkout/tests/rustdoc-gui/help-page.goml help-page... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` line 16
from `tests/rustdoc-gui/help-page.goml` line 23
from `tests/rustdoc-gui/help-page.goml` line 32: Error: Evaluation failed: The following errors happened: [localStorage item "rustdoc-theme" (of value "ayu") != "null"]: for command `assert-local-storage: {"rustdoc-theme": |theme|}`
Error: ()
Build completed unsuccessfully in 0:03:29
local time: Fri Jun 14 02:38:17 UTC 2024
network time: Fri, 14 Jun 2024 02:38:17 GMT
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
That CI failure is unrelated -- I think rustdoc was messing with CI last night #126445
@bors r=WaffleLapkin rollup
📌 Commit fdd90db has been approved by WaffleLapkin
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
bors added a commit to rust-lang-ci/rust that referenced this pull request
…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
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
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