]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-42234-unknown-receiver-type.stderr
Add more context for type parameters
[rust.git] / src / test / ui / span / issue-42234-unknown-receiver-type.stderr
1 error[E0282]: type annotations needed for `std::option::Option<_>`
2   --> $DIR/issue-42234-unknown-receiver-type.rs:7:7
3    |
4 LL |     let x: Option<_> = None;
5    |         - consider giving `x` the explicit type `std::option::Option<_>`, where the type parameter `T` is specified
6 LL |     x.unwrap().method_that_could_exist_on_some_type();
7    |       ^^^^^^ cannot infer type for type parameter `T`
8    |
9    = note: type must be known at this point
10
11 error[E0282]: type annotations needed
12   --> $DIR/issue-42234-unknown-receiver-type.rs:13:10
13    |
14 LL |         .sum::<_>()
15    |          ^^^ cannot infer type
16    |
17    = note: type must be known at this point
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0282`.