rust/src/test/ui/block-result/consider-removing-last-semi.stderr

32 lines
1000 B
Plaintext
Raw Normal View History

2017-06-23 19:43:35 -05:00
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/consider-removing-last-semi.rs:1:18
2017-06-23 19:43:35 -05:00
|
2018-02-22 18:42:32 -06:00
LL | fn f() -> String { //~ ERROR mismatched types
2017-06-23 19:43:35 -05:00
| __________________^
2018-02-22 18:42:32 -06:00
LL | | 0u8;
LL | | "bla".to_string();
| | - help: consider removing this semicolon
2018-02-22 18:42:32 -06:00
LL | | }
2017-06-23 19:43:35 -05:00
| |_^ expected struct `std::string::String`, found ()
|
= note: expected type `std::string::String`
found type `()`
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/consider-removing-last-semi.rs:6:18
2017-06-23 19:43:35 -05:00
|
2018-02-22 18:42:32 -06:00
LL | fn g() -> String { //~ ERROR mismatched types
2017-06-23 19:43:35 -05:00
| __________________^
2018-02-22 18:42:32 -06:00
LL | | "this won't work".to_string();
LL | | "removeme".to_string();
| | - help: consider removing this semicolon
2018-02-22 18:42:32 -06:00
LL | | }
2017-06-23 19:43:35 -05:00
| |_^ expected struct `std::string::String`, found ()
|
= note: expected type `std::string::String`
found type `()`
error: aborting due to 2 previous errors
2017-06-23 19:43:35 -05:00
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0308`.