error[E0282]: type annotations needed for `Option<_>` --> $DIR/issue-42234-unknown-receiver-type.rs:7:7 | LL | let x: Option<_> = None; | - consider giving `x` the explicit type `Option<_>`, where the type parameter `T` is specified LL | x.unwrap().method_that_could_exist_on_some_type(); | ^^^^^^ cannot infer type for type parameter `T` | = note: type must be known at this point error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:13:10 | LL | .sum::<_>() | ^^^ cannot infer type | = note: type must be known at this point error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0282`.