Closed
Description
Error messages use _
a lot but it's meaning is never explained. This could be improved.
fn test(o: Option<i32>) {}
fn main() {
let i = 7;
test(i);
}
Error:
// What is `_` supposed to mean? Apparently integral value but it still seems meaningless...
... error ... expected `core::option::Option<i32>`, found `_` ... found integral variable)
<anon>:5 test(i);
^
error: aborting due to previous error
6/8/2017: updated error message:
error[E0308]: mismatched types
--> <anon>:5:10
|
5 | test(i);
| ^ expected enum `std::option::Option`, found integral variable
|
= note: expected type `std::option::Option<i32>`
found type `{integer}`
error: aborting due to previous error