error[E0271]: type mismatch resolving `for<'x> >::A == &'x isize` --> $DIR/associated-types-eq-hr.rs:87:5 | LL | fn foo() | --- required by a bound in this LL | where LL | T: for<'x> TheTrait<&'x isize, A = &'x isize>, | ------------- required by this bound in `foo` ... LL | foo::(); | ^^^^^^^^^^^^^^^^^ expected `isize`, found `usize` | = note: expected reference `&isize` found reference `&usize` error[E0271]: type mismatch resolving `for<'x> >::A == &'x usize` --> $DIR/associated-types-eq-hr.rs:91:5 | LL | fn bar() | --- required by a bound in this LL | where LL | T: for<'x> TheTrait<&'x isize, A = &'x usize>, | ------------- required by this bound in `bar` ... LL | bar::(); | ^^^^^^^^^^^^^^^^ expected `usize`, found `isize` | = note: expected reference `&usize` found reference `&isize` error[E0271]: type mismatch resolving `for<'x, 'y> >::A == &'x isize` --> $DIR/associated-types-eq-hr.rs:96:5 | LL | fn tuple_one() | --------- required by a bound in this LL | where LL | T: for<'x, 'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>, | ------------- required by this bound in `tuple_one` ... LL | tuple_one::(); | ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime error[E0271]: type mismatch resolving `for<'x, 'y> >::A == &'y isize` --> $DIR/associated-types-eq-hr.rs:101:5 | LL | fn tuple_two() | --------- required by a bound in this LL | where LL | T: for<'x, 'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>, | ------------- required by this bound in `tuple_two` ... LL | tuple_two::(); | ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'y, found concrete lifetime error: implementation of `TheTrait` is not general enough --> $DIR/associated-types-eq-hr.rs:110:5 | LL | / pub trait TheTrait { LL | | type A; LL | | LL | | fn get(&self, t: T) -> Self::A; LL | | } | |_- trait `TheTrait` defined here ... LL | tuple_four::(); | ^^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough | = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`... = note: ...but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2` error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0271`.