]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-result/consider-removing-last-semi.stderr
Rollup merge of #58976 - phil-opp:patch-2, r=alexcrichton
[rust.git] / src / test / ui / block-result / consider-removing-last-semi.stderr
1 error[E0308]: mismatched types
2   --> $DIR/consider-removing-last-semi.rs:1:11
3    |
4 LL | fn f() -> String {
5    |    -      ^^^^^^ expected struct `std::string::String`, found ()
6    |    |
7    |    this function's body doesn't return
8 LL |     0u8;
9 LL |     "bla".to_string();
10    |                      - help: consider removing this semicolon
11    |
12    = note: expected type `std::string::String`
13               found type `()`
14
15 error[E0308]: mismatched types
16   --> $DIR/consider-removing-last-semi.rs:6:11
17    |
18 LL | fn g() -> String {
19    |    -      ^^^^^^ expected struct `std::string::String`, found ()
20    |    |
21    |    this function's body doesn't return
22 LL |     "this won't work".to_string();
23 LL |     "removeme".to_string();
24    |                           - help: consider removing this semicolon
25    |
26    = note: expected type `std::string::String`
27               found type `()`
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0308`.