]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/issue-6458-4.rs:1:20 |
ff7c6d11 | 3 | | |
532ac7d7 | 4 | LL | fn foo(b: bool) -> Result<bool,String> { |
60c5eb7d | 5 | | --- ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()` |
0731742a | 6 | | | |
416331ca | 7 | | implicitly returns `()` as its body has no tail or `return` expression |
0731742a XL |
8 | LL | Err("bar".to_string()); |
9 | | - help: consider removing this semicolon | |
ff7c6d11 | 10 | | |
60c5eb7d XL |
11 | = note: expected enum `std::result::Result<bool, std::string::String>` |
12 | found unit type `()` | |
ff7c6d11 XL |
13 | |
14 | error: aborting due to previous error | |
15 | ||
0531ce1d | 16 | For more information about this error, try `rustc --explain E0308`. |