Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto merge of #15991 : pcwalton/rust/resolve-regions-in-trait-matchin…
…g, r=alexcrichton matching. This breaks code like: struct Foo<'a,'b> { x: &'a int, y: &'b int, } trait Tr { fn foo(x: Self) {} } impl<'a,'b> Tr for Foo<'a,'b> { fn foo(x: Foo<'b,'a>) {} // <-- bad } Change this code to not contain a lifetime mismatch error. For example: struct Foo<'a,'b> { x: &'a int, y: &'b int, } trait Tr { fn foo(x: Self) {} } impl<'a,'b> Tr for Foo<'a,'b> { fn foo(x: Foo<'a,'b>) {} // OK } Closes #15517. [breaking-change] r? @alexcrichton
- Loading branch information