about summary refs log tree commit diff
path: root/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs
blob: cb41e9abcd1a2722e77c2777e7d0e4abcb663f1d (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, B>(a: A) -> B {
    return a.bar(); //~ ERROR mismatched types
}
fn main() {}