2022-05-11 05:18:02 -05:00
|
|
|
struct A<T>(T);
|
|
|
|
struct B;
|
|
|
|
|
|
|
|
trait I<T> {}
|
|
|
|
impl I<i32> for B {}
|
|
|
|
impl I<u32> for B {}
|
|
|
|
|
|
|
|
trait V<U> {
|
|
|
|
fn method(self) -> U;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T, U> V<U> for A<T>
|
|
|
|
where
|
|
|
|
T: I<U>,
|
|
|
|
{
|
|
|
|
fn method(self) -> U { unimplemented!() }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = A(B);
|
2023-08-14 08:09:53 -05:00
|
|
|
a.method(); //~ ERROR type annotations needed
|
2022-05-11 05:18:02 -05:00
|
|
|
}
|