fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
941 B31 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   |
12   = note: expected type `std::string::String`
13              found type `()`
14
15error[E0308]: mismatched types
16  --> $DIR/issue-13428.rs:11:13
17   |
18LL | fn bar() -> String {
19   |    ---      ^^^^^^ expected struct `std::string::String`, found ()
20   |    |
21   |    implicitly returns `()` as its body has no tail or `return` expression
22LL |     "foobar".to_string()
23LL |     ;
24   |     - help: consider removing this semicolon
25   |
26   = note: expected type `std::string::String`
27              found type `()`
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0308`.