check universes when instantiating infer vars with placeholders#109813
Closed
lcnr wants to merge 2 commits into
Closed
check universes when instantiating infer vars with placeholders#109813lcnr wants to merge 2 commits into
lcnr wants to merge 2 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
aliemjay
reviewed
Apr 3, 2023
aliemjay
left a comment
Contributor
There was a problem hiding this comment.
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.
Comment on lines
+843
to
844
| // Need to manually relate as `super_relate_consts` is not simply structural. | ||
| ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, substs }) => { |
Contributor
There was a problem hiding this comment.
Same here, though this requires changing super_relate_consts to not do const evaluation. Probably out of the scope of this PR.
Contributor
Author
|
won't finish this work, would be good for someone to take this over 🤔 |
Member
|
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 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 15, 2023
…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`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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