-
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 with trait objects and HRTBs #90177
Comments
1.56.0 is released on stable, and it ICEs there as well. @rustbot label regression-from-stable-to-stable |
Bisection led to nightly-2021-07-26. Automatic commit bisection failed. Manual commit bisection:
Regression comes from #86461. |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
Oops. Sorry for creating this ICE. I haven't really dig into this issue yet, but from the description, it seems this ICE comes from
where the equality should be true within a certain call, but didn't because of the HRTB region.
This inequality is because the two parameters comes from two different routes.
The second comes from rust/compiler/rustc_trait_selection/src/traits/mod.rs Lines 564 to 566 in 6f942a2
, i think the subst_supertrait() call is the real difference here.
This is my current theory, and i'll try to validate it with debugging rustc this week. I'm not totally sure what's the best way to fix this. I think maybe @jackh726 could give me some advice dealing with HRTBs here? |
By the way, i've printed out the contents of the vtable for
|
Should it just use But, I'd like to see what the two trait refs are. |
So... They're the same with So i switched to use Complete diagnostics output:
|
This could "just" be fixed by anonymizing both trait refs. The I have to remember how we deduplicate these predicates elsewhere. |
Created #90536 for erasing regions before comparison. Let me know if there's a more proper approach, and i'll update the pr accordingly. |
Anyone think this needs a backport? |
Code
(Playground)
Meta
rustc --version --verbose
:This is also present in beta and nightly versions, but it is not present on 1.55.0 stable.
Error output
Backtrace
The text was updated successfully, but these errors were encountered: