35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/issue-13428.rs:3: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:11: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`.
|