]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-6458-4.stderr
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-6458-4.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-6458-4.rs:1:20
3    |
4 LL | fn foo(b: bool) -> Result<bool,String> {
5    |    ---             ^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
6    |    |
7    |    implicitly returns `()` as its body has no tail or `return` expression
8 LL |     Err("bar".to_string());
9    |                           - help: remove this semicolon to return this value
10    |
11    = note:   expected enum `Result<bool, String>`
12            found unit type `()`
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0308`.