blob: 205b1173e079f5ea2596e6fe453ea59cbfa8063d [file] [log] [blame]
struct Thing<X>(X);
trait Method<T> {
fn method(self, _: i32) -> T;
}
impl<X> Method<i32> for Thing<X> {
fn method(self, _: i32) -> i32 { 0 }
}
impl<X> Method<u32> for Thing<X> {
fn method(self, _: i32) -> u32 { 0 }
}
fn main() {
let thing = Thing(true);
thing.method(42); //~ ERROR type annotations needed
}