blob: 9a444be500c41ad076f3e5f946794f10f57af7e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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
//~| ERROR type annotations needed
}
|