1 error[E0308]: mismatched types
2 --> $DIR/issue-6458-4.rs:1:20
4 LL | fn foo(b: bool) -> Result<bool,String> {
5 | --- ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
7 | implicitly returns `()` as its body has no tail or `return` expression
8 LL | Err("bar".to_string());
9 | - help: consider removing this semicolon
11 = note: expected enum `std::result::Result<bool, String>`
14 error: aborting due to previous error
16 For more information about this error, try `rustc --explain E0308`.