Don't add outlives constraints, even if assoc types have lifetime params:
Aureas examples (for reference):
trait Foo<'a> {
type Assoc<'b> where 'a: 'b, Self: 'b;
fn get<'b>(&'b mut self) -> Self::Assoc<'b>;
}
struct A<'a> {
f: &'a mut i32,
}
impl<'a> Foo<'a> for A<'a> {
type Assoc<'b> = &'b mut i32
where 'a: 'b, Self: 'b;
fn get<'b>(&'b mut self) -> Self::Assoc<'b> {
&mut self.f
}
}
fn main() {
let mut i = 42;
let mut a = A {
f: &mut i,
};
*a.get() += 1;
println!("{i}");
}
Don't add outlives constraints, even if assoc types have lifetime params:
Aureas examples (for reference):