]> git.lizzy.rs Git - rust.git/commit
Auto merge of #37717 - nikomatsakis:region-obligations-pre, r=eddyb
authorbors <bors@rust-lang.org>
Thu, 17 Nov 2016 09:18:51 +0000 (01:18 -0800)
committerGitHub <noreply@github.com>
Thu, 17 Nov 2016 09:18:51 +0000 (01:18 -0800)
commit29181b3f0c6b27bad24b78630a55b0d527b57068
treeae83b2ac5692e08195e3fefaa757c8cfc4409d68
parent6cd5be81cc3a6f972eb00541224037a95a08cc7b
parent48dc6e26ca2ccb72a241ea42af509c4dcf3636fb
Auto merge of #37717 - nikomatsakis:region-obligations-pre, r=eddyb

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