]> git.lizzy.rs Git - rust.git/commit
rollup merge of #22436: nikomatsakis/issue-22246-bound-lifetimes-of-assoc-types
authorAlex Crichton <alex@alexcrichton.com>
Wed, 18 Feb 2015 22:31:58 +0000 (14:31 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 18 Feb 2015 22:31:58 +0000 (14:31 -0800)
commit754db0f7ac35edcddeb3e6a27969a7c3a380f936
tree5931b7fa21d4bdea3c3e9f0808d66da23408f430
parent31166ecf798ee9f1e17e74e33f461613d59c7fe1
parent9bb3b3772d4be69b0f619bd9456255a9e3bc7d9e
rollup merge of #22436: nikomatsakis/issue-22246-bound-lifetimes-of-assoc-types

Take 2. This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs. I patched the two issues I was concerned about, which was the handling of supertraits and HRTB (the latter turned out to be fine, so I added a comment explaining why.)

r? @pnkfelix (for now, anyway)
cc @aturon

[implied bounds]: http://smallcultfollowing.com/babysteps/blog/2014/07/06/implied-bounds/
src/librustc/middle/traits/select.rs
src/librustc/middle/ty.rs
src/librustc_trans/trans/expr.rs
src/librustc_typeck/check/mod.rs