-
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
universes refactor 3 #55305
universes refactor 3 #55305
Conversation
This comment has been minimized.
This comment has been minimized.
r? @scalexm |
This comment has been minimized.
This comment has been minimized.
5484f6f
to
ff0fb20
Compare
src/librustc/infer/canonical/mod.rs
Outdated
Region, | ||
Region(ty::UniverseIndex), | ||
|
||
/// Region variable `'?R`. |
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.
I don't think you wanted the exact same comment as the one above?
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.
Fixed.
b83b413
to
5a16d60
Compare
I'm removing the WIP tag. =) Though I would still like to spend a bit of time looking carefully over the code. But I guess the test suite passing is a good sign I've not changed much behavior here ;) |
There might be room though for an assert or two -- e.g., in the canonicalization code -- checking that we don't have any universes in places we don't expect them. |
Nothing strikes me regarding changes of behavior. r=me if you ever want to add those asserts |
@bors r=scalexm |
📌 Commit bcc2a7ffdb96b57b24638f76fee4033ebed65c8b has been approved by |
☔ The latest upstream changes (presumably #55274) made this pull request unmergeable. Please resolve the merge conflicts. |
But.. we don't really use it for anything right now.
The idea here is that an incoming query may refer to some universes, and they query response may contain fresh universes that go beyond those. When we instantiate the query response in the caller's scope, therefore, we map those new universes into fresh universes for the caller.
In particular, we don't want to preserve the universes for the `'_` variables that appear in there. And we don't expect to find any placeholders, which justifies this as harmless. (In particular, if you have a query like `Foo(!1, !2, ?3)`, then you care about the universe of `?3`, since it may control whether `?3 = !1` and `?3 = !2` is a valid answer. But without any placeholders, we don't really care: any placeholders that would appear in the output must therefore come from some fresh universe anyway.)
Required for test expect-fn-supply-fn.rs to pass; otherwise we have unconstrained inference variables that get inferred to `'empty`.
⌛ Testing commit 36516e8ea82205a4f3b121518714353b15bb3c6f with merge f9c51413cb5661f89a6d12a3d05efdbb9d82c3bc... |
Bors was testing two PRs at once. @bors retry |
Account for incompatible universes and higher-ranked subtyping.
192820a
to
c244fd7
Compare
@bors r=scalexm |
📌 Commit c244fd7 has been approved by |
⌛ Testing commit c244fd7 with merge 29f782cbf921d0478683873670eb68e1739fe96c... |
💔 Test failed - status-appveyor |
yet another timeout, not the same job as the first one, and the build times seem to be varying randomly, so I believe this is not due to a perf problem? |
@bors retry |
universes refactor 3 Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't **believe** this branch changes our behavior in any notable way, though I'm marking the branch as `WIP` to give myself a chance to verify this. r? @scalexm
☀️ Test successful - status-appveyor, status-travis |
For the benefit of the viewing audience: This is a part of #48049 (remove the leak check in favor of "universes") |
Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't believe this branch changes our behavior in any notable way, though I'm marking the branch as
WIP
to give myself a chance to verify this.r? @scalexm