|
1 | 1 | error[E0308]: mismatched types |
2 | | - --> $DIR/issue-13428.rs:3:20 |
| 2 | + --> $DIR/issue-13428.rs:3:13 |
3 | 3 | | |
4 | | -LL | fn foo() -> String { //~ ERROR mismatched types |
5 | | - | ____________________^ |
6 | | -LL | | format!("Hello {}", |
7 | | -LL | | "world") |
8 | | -LL | | // Put the trailing semicolon on its own line to test that the |
9 | | -LL | | // note message gets the offending semicolon exactly |
10 | | -LL | | ; |
11 | | - | | - help: consider removing this semicolon |
12 | | -LL | | } |
13 | | - | |_^ expected struct `std::string::String`, found () |
| 4 | +LL | fn foo() -> String { //~ ERROR mismatched types |
| 5 | + | ^^^^^^ expected struct `std::string::String`, found () |
| 6 | +... |
| 7 | +LL | ; |
| 8 | + | - help: consider removing this semicolon |
14 | 9 | | |
15 | 10 | = note: expected type `std::string::String` |
16 | 11 | found type `()` |
17 | 12 |
|
18 | 13 | error[E0308]: mismatched types |
19 | | - --> $DIR/issue-13428.rs:11:20 |
| 14 | + --> $DIR/issue-13428.rs:11:13 |
20 | 15 | | |
21 | | -LL | fn bar() -> String { //~ ERROR mismatched types |
22 | | - | ____________________^ |
23 | | -LL | | "foobar".to_string() |
24 | | -LL | | ; |
25 | | - | | - help: consider removing this semicolon |
26 | | -LL | | } |
27 | | - | |_^ expected struct `std::string::String`, found () |
| 16 | +LL | fn bar() -> String { //~ ERROR mismatched types |
| 17 | + | ^^^^^^ expected struct `std::string::String`, found () |
| 18 | +LL | "foobar".to_string() |
| 19 | +LL | ; |
| 20 | + | - help: consider removing this semicolon |
28 | 21 | | |
29 | 22 | = note: expected type `std::string::String` |
30 | 23 | found type `()` |
|
0 commit comments