2017-12-10 13:47:55 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/issue-6458-4.rs:11:40
|
|
|
|
|
|
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-02-19 14:40:25 -06:00
|
|
|
If you want more information on this error, try using "rustc --explain E0308"
|