-
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
check universes when instantiating infer vars with placeholders #109813
Conversation
This comment has been minimized.
This comment has been minimized.
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.
In addition to merging the generalizer, another couple notes:
- rename
TypeVariableTable::{instantiate => instantiate_ignoring_universe}
to make it clear that the caller is responsible for checking universes.
// Need to manually relate as `super_relate_consts` is not simply structural. | ||
ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, substs }) => { |
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.
Same here, though this requires changing super_relate_consts
to not do const evaluation. Probably out of the scope of this PR.
won't finish this work, would be good for someone to take this over 🤔 |
If nobody has done it by the time im done working on proof tree output for new solver and finished experimenting with representing universes via trees instead of a counter then I'll get to this |
…lcnr Combine three generalizer implementations Fixes rust-lang#111092 Fixes rust-lang#109505 This code is a bit delicate and there were subtle changes between them, so I'll leave inline comments where further inspection is needed. Regarding this comment from rust-lang#109813 -- "add tests triggering all codepaths: at least the combine and the const generalizer", can't really do that now, and I don't really know how we'd get a higher-ranked const error since non-lifetime binders doesn't *really* support `for<const ..>` (it errors out when you try to use it). r? `@lcnr`
fixes #109505
probably not going to finish that soon and would like someone to take this over.
what needs to be done:
36 times is bound to cause issues at some pointr? @compiler-errors @BoxyUwU