-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type system
Milestone
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type system