2017-12-10 13:47:55 -06:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-6458-4.rs:1:40
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | fn foo(b: bool) -> Result<bool,String> { //~ ERROR mismatched types
|
2017-12-10 13:47:55 -06:00
|
|
|
| ________________________________________^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | Err("bar".to_string());
|
2017-12-10 13:47:55 -06:00
|
|
|
| | - help: consider removing this semicolon
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | | }
|
2017-12-10 13:47:55 -06:00
|
|
|
| |_^ expected enum `std::result::Result`, found ()
|
|
|
|
|
|
|
|
|
= 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`.
|