]>
Commit | Line | Data |
---|---|---|
923072b8 FG |
1 | error[E0282]: type annotations needed |
2 | --> $DIR/issue-42234-unknown-receiver-type.rs:9:24 | |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | let x: Option<_> = None; |
923072b8 | 5 | | ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option` |
064997fb FG |
6 | LL | x.unwrap().method_that_could_exist_on_some_type(); |
7 | | ---------- type must be known at this point | |
94b46f34 | 8 | | |
923072b8 FG |
9 | help: consider specifying the generic argument |
10 | | | |
11 | LL | let x: Option<_> = None::<T>; | |
12 | | +++++ | |
2c00a5a8 | 13 | |
0531ce1d | 14 | error[E0282]: type annotations needed |
923072b8 | 15 | --> $DIR/issue-42234-unknown-receiver-type.rs:15:10 |
2c00a5a8 | 16 | | |
60c5eb7d | 17 | LL | .sum::<_>() |
9ffffee4 | 18 | | ^^^ cannot infer type of the type parameter `S` declared on the method `sum` |
94b46f34 | 19 | | |
923072b8 FG |
20 | help: consider specifying the generic argument |
21 | | | |
22 | LL | .sum::<_>() | |
23 | | ~~~~~ | |
2c00a5a8 XL |
24 | |
25 | error: aborting due to 2 previous errors | |
26 | ||
0531ce1d | 27 | For more information about this error, try `rustc --explain E0282`. |