2 #![allow(unused)] // for the fixed file
4 trait Trait<T = Self> {
7 fn func(&self) -> Self::A;
12 fn foo<'a, T: Trait + 'a>(&self, _: impl Trait, x: impl Trait<A = usize>, _: T) {
13 qux(x.func()) //~ ERROR mismatched types
16 fn ban<T>(x: T) where T: Trait<A = usize> {
17 qux(x.func()) //~ ERROR mismatched types
21 fn foo<'a, T: Trait + 'a>(_: impl Trait, x: impl Trait<A = usize>, _: T) {
22 qux(x.func()) //~ ERROR mismatched types
25 fn bar<T: Trait<A = usize>>(x: T) {
26 qux(x.func()) //~ ERROR mismatched types
29 fn foo2(x: impl Trait<i32, A = usize>) {
30 qux(x.func()) //~ ERROR mismatched types
33 fn bar2<T: Trait<i32, A = usize>>(x: T) {
34 qux(x.func()) //~ ERROR mismatched types
37 fn ban<T>(x: T) where T: Trait<A = usize> {
38 qux(x.func()) //~ ERROR mismatched types