Skip to content
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

Refactoring towards region obligation #37717

Merged
merged 2 commits into from
Nov 17, 2016

Conversation

nikomatsakis
Copy link
Contributor

Two refactorings towards the intermediate goal of propagating region obligations through the InferOk structure (which in turn leads to the possibility of lazy normalization).

  1. Remove TypeOrigin and add ObligationCause
    • as we converge subtyping and obligations and so forth, the ability to keep these types distinct gets harder
  2. Propagate obligations from InferOk into the surrounding fulfillment context

After these land, I have a separate branch (which still needs a bit of work) that can make the actual change to stop directly adding subregion edges and instead propagate obligations. (This should also make it easier to fix the unsoundness in specialization around lifetimes.)

r? @eddyb

@eddyb
Copy link
Member

eddyb commented Nov 11, 2016

r=me with a rebase.

@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Nov 11, 2016

📌 Commit f9a79ed has been approved by eddyb

bors added a commit that referenced this pull request Nov 12, 2016
@bors
Copy link
Contributor

bors commented Nov 12, 2016

🔒 Merge conflict

@bors
Copy link
Contributor

bors commented Nov 12, 2016

☔ The latest upstream changes (presumably #37730) made this pull request unmergeable. Please resolve the merge conflicts.

In general having all these different structs for "origins" is not
great, since equating types can cause obligations and vice-versa.  I
think we should gradually collapse these things. We almost certainly
also need to invest a big more energy into the `error_reporting` code to
rationalize it: this PR does kind of the minimal effort in that
direction.
Or at least, more properly. I think I left one or two FIXMEs still in
there.

cc rust-lang#32730
@nikomatsakis
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Nov 16, 2016

📌 Commit 48dc6e2 has been approved by eddyb

@bors
Copy link
Contributor

bors commented Nov 16, 2016

⌛ Testing commit 48dc6e2 with merge 50fce0c...

@alexcrichton
Copy link
Member

@bors: retry force clean

@bors
Copy link
Contributor

bors commented Nov 17, 2016

⌛ Testing commit 48dc6e2 with merge 29181b3...

bors added a commit that referenced this pull request Nov 17, 2016
Refactoring towards region obligation

Two refactorings towards the intermediate goal of propagating region obligations through the `InferOk` structure (which in turn leads to the possibility of lazy normalization).

1. Remove `TypeOrigin` and add `ObligationCause`
    - as we converge subtyping and obligations and so forth, the ability to keep these types distinct gets harder
2. Propagate obligations from `InferOk` into the surrounding fulfillment context

After these land, I have a separate branch (which still needs a bit of work) that can make the actual change to stop directly adding subregion edges and instead propagate obligations. (This should also make it easier to fix the unsoundness in specialization around lifetimes.)

r? @eddyb
@bors bors merged commit 48dc6e2 into rust-lang:master Nov 17, 2016
@nikomatsakis nikomatsakis deleted the region-obligations-pre branch April 14, 2017 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants