-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE: MIR const-checker found novel structural match violation #73431
Comments
so afaict, So in a sense |
Marking it as p-critical as per our discussion |
Make novel structural match violations not a `bug` Fixes (on master) rust-lang#73431. Ideally, `CustomEq` would emit a strict subset of the structural match errors that are found by `search_for_structural_match_violation`, since it allows more cases due to value-based reasoning. However, const qualification is more conservative than `search_for_structural_match_violation` around associated constants, since qualification does not try to substitute type parameters. In the long term, we should probably make const qualification work for generic associated constants, but I don't like extending its capabilities even further. r? @pnkfelix
So speaking of structure match/equality, was there any progress in documenting what the exact guarantees are here? Withe each bug like this, I feel more unease around the lack of documentation here.^^ And that is even more so when two checks for that property disagree... The previous Zulip discussion did not really reach any conclusion. |
Make novel structural match violations not a `bug` Fixes (on master) rust-lang#73431. Ideally, `CustomEq` would emit a strict subset of the structural match errors that are found by `search_for_structural_match_violation`, since it allows more cases due to value-based reasoning. However, const qualification is more conservative than `search_for_structural_match_violation` around associated constants, since qualification does not try to substitute type parameters. In the long term, we should probably make const qualification work for generic associated constants, but I don't like extending its capabilities even further. r? @pnkfelix
Make novel structural match violations not a `bug` Fixes (on master) rust-lang#73431. Ideally, `CustomEq` would emit a strict subset of the structural match errors that are found by `search_for_structural_match_violation`, since it allows more cases due to value-based reasoning. However, const qualification is more conservative than `search_for_structural_match_violation` around associated constants, since qualification does not try to substitute type parameters. In the long term, we should probably make const qualification work for generic associated constants, but I don't like extending its capabilities even further. r? @pnkfelix
Since #73446 was beta-backported, I will remove the critical priority from this issue. |
Assigning |
Tracking the remaining work here in #73448, closing this issue |
This code causes an ICE on both beta and nightly, but not stable. bisect-rustc pointed me to #67343.
It seems to be an issue with the generic
Wrapper<T>
-- manually implementingZero
forWrapper<usize>
doesn't trigger the issue.Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: