]>
Commit | Line | Data |
---|---|---|
041b39d2 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/consider-removing-last-semi.rs:1:11 |
041b39d2 | 3 | | |
532ac7d7 | 4 | LL | fn f() -> String { |
60c5eb7d | 5 | | - ^^^^^^ expected struct `std::string::String`, found `()` |
0731742a | 6 | | | |
416331ca | 7 | | implicitly returns `()` as its body has no tail or `return` expression |
0731742a XL |
8 | LL | 0u8; |
9 | LL | "bla".to_string(); | |
10 | | - help: consider removing this semicolon | |
041b39d2 XL |
11 | |
12 | error[E0308]: mismatched types | |
0731742a | 13 | --> $DIR/consider-removing-last-semi.rs:6:11 |
041b39d2 | 14 | | |
532ac7d7 | 15 | LL | fn g() -> String { |
60c5eb7d | 16 | | - ^^^^^^ expected struct `std::string::String`, found `()` |
0731742a | 17 | | | |
416331ca | 18 | | implicitly returns `()` as its body has no tail or `return` expression |
0731742a XL |
19 | LL | "this won't work".to_string(); |
20 | LL | "removeme".to_string(); | |
21 | | - help: consider removing this semicolon | |
041b39d2 XL |
22 | |
23 | error: aborting due to 2 previous errors | |
24 | ||
0531ce1d | 25 | For more information about this error, try `rustc --explain E0308`. |