]> git.proxmox.com Git - rustc.git/blame - src/test/ui/span/issue-42234-unknown-receiver-type.stderr
New upstream version 1.40.0+dfsg1
[rustc.git] / src / test / ui / span / issue-42234-unknown-receiver-type.stderr
CommitLineData
dc9dc135 1error[E0282]: type annotations needed for `std::option::Option<_>`
e1599b0c 2 --> $DIR/issue-42234-unknown-receiver-type.rs:7:7
2c00a5a8 3 |
0531ce1d 4LL | let x: Option<_> = None;
dc9dc135 5 | - consider giving `x` the explicit type `std::option::Option<_>`, where the type parameter `T` is specified
0531ce1d 6LL | x.unwrap().method_that_could_exist_on_some_type();
e1599b0c 7 | ^^^^^^ cannot infer type for `T`
94b46f34
XL
8 |
9 = note: type must be known at this point
2c00a5a8 10
0531ce1d 11error[E0282]: type annotations needed
0731742a 12 --> $DIR/issue-42234-unknown-receiver-type.rs:12:5
2c00a5a8 13 |
532ac7d7 14LL | / data.iter()
0531ce1d 15LL | | .sum::<_>()
8faf50e0 16 | |___________________^ cannot infer type
94b46f34
XL
17 |
18 = note: type must be known at this point
2c00a5a8
XL
19
20error: aborting due to 2 previous errors
21
0531ce1d 22For more information about this error, try `rustc --explain E0282`.