error[E0308]: mismatched types --> $DIR/issue-13428.rs:3:13 | LL | fn foo() -> String { //~ ERROR mismatched types | --- ^^^^^^ expected struct `std::string::String`, found () | | | this function's body doesn't return ... LL | ; | - help: consider removing this semicolon | = note: expected type `std::string::String` found type `()` error[E0308]: mismatched types --> $DIR/issue-13428.rs:11:13 | LL | fn bar() -> String { //~ ERROR mismatched types | --- ^^^^^^ expected struct `std::string::String`, found () | | | this function's body doesn't return LL | "foobar".to_string() LL | ; | - help: consider removing this semicolon | = note: expected type `std::string::String` found type `()` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`.