about summary refs log tree commit diff
path: root/tests/ui/associated-types/hr-associated-type-bound-2.rs
blob: 467400f4b800c261ce8b89dddec957e289c15343 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
trait X<'a>
where
    for<'b> <Self as X<'b>>::U: Clone,
{
    type U: ?Sized;
    fn f(&self, x: &Self::U) {
        <Self::U>::clone(x);
    }
}

impl X<'_> for u32 //~ ERROR overflow evaluating the requirement `for<'b> u32: X<'b>`
where
    for<'b> <Self as X<'b>>::U: Clone,
{
    type U = str;
}

fn main() {
    1u32.f("abc");
}