summaryrefslogtreecommitdiffstats
path: root/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed
blob: b3f5ad52db593083a7a4be10809238931ccd07b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-rustfix
pub trait MyTrait {
    type T;

    fn bar(self) -> Self::T;
}

pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B {
    return a.bar(); //~ ERROR mismatched types
}
fn main() {}