mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 06:34:22 +00:00
23 lines
303 B
Rust
23 lines
303 B
Rust
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);
|
|
a.method(); //~ ERROR type annotations needed
|
|
}
|