Uh oh!
There was an error while loading. Please reload this page.
enforce WF conditions after generalizing - #41716
Conversation
bors
commented
May 6, 2017
☔ The latest upstream changes (presumably #41773) made this pull request unmergeable. Please resolve the merge conflicts. |
arielb1
commented
May 7, 2017
Got back from holidays. Had a fun week. This looks like a rather brutal fix. As for concrete worries, I was worried that we might create wf obligations "inside" an higher-ranked binder, and that would cause trouble, but I don't think we ever do subtyping in a higher-ranked context right now? |
nikomatsakis
commented
May 9, 2017
Brutal as in "brute force"?
I don't think that would be a problem. It's not that we don't do subtyping in a higher-ranked context. Rather, it's that we protect against skolemized regions "escaping" into instantiated type variables. If we did instantiate some type variable with something that includes skolemized regions --- or with region variables that wind up related to skolemized variables --- that would be detected during the leak-check. Since we only ever create the (As an aside, I am, though, actively planning how to overhaul that system right now to make it more robust, roughly in the manner that we talked about.) |
arielb1
commented
May 9, 2017
This is basically a hack around bivariance not being implemented properly, but let's go for it (r+ modulo conflict fix). |
The new messages seem universally better. I think these result because we recognize that we are in an invariant context more often.
nikomatsakis
commented
May 11, 2017
@bors r=arielb1 |
bors
commented
May 11, 2017
📌 Commit 2490ee5 has been approved by |
enforce WF conditions after generalizing Add a `WF(T')` obligation after generalizing `T` to `T'`, if `T'` contains an unconstrained type variable in a bivariant context. Fixesrust-lang#41677. Beta nominating -- regression. r? @arielb1
enforce WF conditions after generalizing Add a `WF(T')` obligation after generalizing `T` to `T'`, if `T'` contains an unconstrained type variable in a bivariant context. Fixesrust-lang#41677. Beta nominating -- regression. r? @arielb1
bors
commented
May 12, 2017
bors
commented
May 12, 2017
☀️ Test successful - status-appveyor, status-travis |
brson
commented
May 23, 2017
Doesn't cherry-pick cleanly cc @nikomatsakis |
nikomatsakis
commented
May 23, 2017
Accepting for backport. cc @rust-lang/compiler |
Add a
WF(T')obligation after generalizingTtoT', ifT'contains an unconstrained type variable in a bivariant context.Fixes#41677.
Beta nominating -- regression.
r? @arielb1