]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-result/issue-13428.stderr
b1f2ca634511b1281c8889a7572570d98a13a96b
[rust.git] / src / test / ui / block-result / issue-13428.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-13428.rs:3:13
3    |
4 LL | fn foo() -> String {
5    |    ---      ^^^^^^ expected struct `std::string::String`, found ()
6    |    |
7    |    implicitly returns `()` as its body has no tail or `return` expression
8 ...
9 LL |     ;
10    |     - help: consider removing this semicolon
11    |
12    = note: expected struct `std::string::String`
13            found unit type `()`
14
15 error[E0308]: mismatched types
16   --> $DIR/issue-13428.rs:11:13
17    |
18 LL | fn bar() -> String {
19    |    ---      ^^^^^^ expected struct `std::string::String`, found ()
20    |    |
21    |    implicitly returns `()` as its body has no tail or `return` expression
22 LL |     "foobar".to_string()
23 LL |     ;
24    |     - help: consider removing this semicolon
25    |
26    = note: expected struct `std::string::String`
27            found unit type `()`
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0308`.