rust/src/test/ui/issues/issue-6458-4.stderr

17 lines
607 B
Plaintext
Raw Normal View History

error[E0308]: mismatched types
--> $DIR/issue-6458-4.rs:1:20
|
LL | fn foo(b: bool) -> Result<bool,String> { //~ ERROR mismatched types
2018-12-30 17:41:19 -06:00
| --- ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
| |
2018-12-30 23:59:27 -06:00
| this function's body doesn't return
LL | Err("bar".to_string());
| - help: consider removing this semicolon
|
= note: expected type `std::result::Result<bool, std::string::String>`
found type `()`
error: aborting due to previous error
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0308`.