fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
781 B25 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-13428.rs:3:13
3   |
4LL | fn foo() -> String {
5   |    ---      ^^^^^^ expected struct `std::string::String`, found `()`
6   |    |
7   |    implicitly returns `()` as its body has no tail or `return` expression
8...
9LL |     ;
10   |     - help: consider removing this semicolon
11
12error[E0308]: mismatched types
13  --> $DIR/issue-13428.rs:11:13
14   |
15LL | fn bar() -> String {
16   |    ---      ^^^^^^ expected struct `std::string::String`, found `()`
17   |    |
18   |    implicitly returns `()` as its body has no tail or `return` expression
19LL |     "foobar".to_string()
20LL |     ;
21   |     - help: consider removing this semicolon
22
23error: aborting due to 2 previous errors
24
25For more information about this error, try `rustc --explain E0308`.