Closed
Description
The following code compiles:
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
}
fn main(){}
Nominating for 1.0, P-backcompat-lang. I may well just fix this along with #14022, since the solution is likely going to be similar to what @nikomatsakis pointed out, but I want to get it on the radar.