Closed
Description
When matching on a range between two values of different type we currently emit the following output:
error[E0308]: mismatched types
--> $DIR/E0308-4.rs:4:9
|
LL | 0u8..=3i8 => (), //~ ERROR E0308
| ^^^^^^^^^ expected u8, found i8
We should have a more targeted error:
error[E0308]: mismatched types
--> $DIR/E0308-4.rs:4:9
|
LL | 0u8..=3i8 => (), //~ ERROR E0308
| --- ^^^ expected u8, found i8
| |
| expected because of this
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint; hard to understand for new users.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Low priorityRelevant to the compiler team, which will review and decide on the PR/issue.