]> git.lizzy.rs Git - rust.git/blob - tests/ui/span/issue-42234-unknown-receiver-type.full.stderr
Optimize `TyKind::eq`.
[rust.git] / tests / ui / span / issue-42234-unknown-receiver-type.full.stderr
1 error[E0282]: type annotations needed
2   --> $DIR/issue-42234-unknown-receiver-type.rs:9:24
3    |
4 LL |     let x: Option<_> = None;
5    |                        ^^^^ cannot infer type of the type parameter `T` declared on the enum `Option`
6 LL |     x.unwrap().method_that_could_exist_on_some_type();
7    |     ---------- type must be known at this point
8    |
9 help: consider specifying the generic argument
10    |
11 LL |     let x: Option<_> = None::<T>;
12    |                            +++++
13
14 error[E0282]: type annotations needed
15   --> $DIR/issue-42234-unknown-receiver-type.rs:15:10
16    |
17 LL |         .sum::<_>()
18    |          ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
19    |
20 help: consider specifying the generic argument
21    |
22 LL |         .sum::<_>()
23    |             ~~~~~
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0282`.