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
@estebank Can I take this one if nobody is working on it?
@PramodBisht go ahead!
@PramodBisht Are you still working on this? Or could I take this over?
@kevgrasso I got occupied with other things, Please take it. Thanks
@estebank I'm getting some weird behavior from my attempted fix. Most of the bugs I'm getting are understandable, but the one I don't understand is that the text annotating for the primary span in the error diagnostic doesn't show up if I let it display to terminal, but it does if I pipe stderr to a file, and I have no idea what I changed that caused this. Any chance you'd have any clue what might have happened? My changes are here if it helps: https://github.com/kevgrasso/rust/commit/3d37d388e40896f10d6105d80dedd2711d183067

@kevgrasso
1) Love the new output!
2) I'm not sure what could be causing this, it seems like it should work based on the code I'm seeing.
Most helpful comment
@kevgrasso I got occupied with other things, Please take it. Thanks