fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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