1 error[E0308]: mismatched types
2 --> $DIR/consider-removing-last-semi.rs:3:15
4 LL | pub fn f() -> String {
5 | - ^^^^^^ expected struct `String`, found `()`
7 | implicitly returns `()` as its body has no tail or `return` expression
9 LL | "bla".to_string();
10 | - help: remove this semicolon to return this value
12 error[E0308]: mismatched types
13 --> $DIR/consider-removing-last-semi.rs:8:15
15 LL | pub fn g() -> String {
16 | - ^^^^^^ expected struct `String`, found `()`
18 | implicitly returns `()` as its body has no tail or `return` expression
19 LL | "this won't work".to_string();
20 LL | "removeme".to_string();
21 | - help: remove this semicolon to return this value
23 error[E0308]: mismatched types
24 --> $DIR/consider-removing-last-semi.rs:13:25
26 LL | pub fn macro_tests() -> u32 {
27 | ----------- ^^^ expected `u32`, found `()`
29 | implicitly returns `()` as its body has no tail or `return` expression
32 | - help: remove this semicolon to return this value
34 error: aborting due to 3 previous errors
36 For more information about this error, try `rustc --explain E0308`.