| error[E0308]: mismatched types |
| --> $DIR/issue-13428.rs:13:20 |
| | |
| LL | fn foo() -> String { //~ ERROR mismatched types |
| | ____________________^ |
| LL | | format!("Hello {}", |
| LL | | "world") |
| LL | | // Put the trailing semicolon on its own line to test that the |
| LL | | // note message gets the offending semicolon exactly |
| LL | | ; |
| | | - help: consider removing this semicolon |
| LL | | } |
| | |_^ expected struct `std::string::String`, found () |
| | |
| = note: expected type `std::string::String` |
| found type `()` |
| |
| error[E0308]: mismatched types |
| --> $DIR/issue-13428.rs:21:20 |
| | |
| LL | fn bar() -> String { //~ ERROR mismatched types |
| | ____________________^ |
| LL | | "foobar".to_string() |
| LL | | ; |
| | | - help: consider removing this semicolon |
| LL | | } |
| | |_^ expected struct `std::string::String`, found () |
| | |
| = 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`. |