]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-result/consider-removing-last-semi.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / block-result / consider-removing-last-semi.stderr
1 error[E0308]: mismatched types
2   --> $DIR/consider-removing-last-semi.rs:11:18
3    |
4 LL |   fn f() -> String {  //~ ERROR mismatched types
5    |  __________________^
6 LL | |     0u8;
7 LL | |     "bla".to_string();
8    | |                      - help: consider removing this semicolon
9 LL | | }
10    | |_^ expected struct `std::string::String`, found ()
11    |
12    = note: expected type `std::string::String`
13               found type `()`
14
15 error[E0308]: mismatched types
16   --> $DIR/consider-removing-last-semi.rs:16:18
17    |
18 LL |   fn g() -> String {  //~ ERROR mismatched types
19    |  __________________^
20 LL | |     "this won't work".to_string();
21 LL | |     "removeme".to_string();
22    | |                           - help: consider removing this semicolon
23 LL | | }
24    | |_^ expected struct `std::string::String`, found ()
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`.