rust/tests/ui/block-result/issue-13428.stderr
Esteban Küber 62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00

23 lines
686 B
Plaintext

error[E0308]: mismatched types
--> $DIR/issue-13428.rs:3:13
|
LL | fn foo() -> String {
| --- ^^^^^^ expected `String`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
error[E0308]: mismatched types
--> $DIR/issue-13428.rs:11:13
|
LL | fn bar() -> String {
| --- ^^^^^^ expected `String`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
LL | "foobar".to_string()
LL | ;
| - help: remove this semicolon to return this value
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.