bors[bot] 29f5154d1c
Merge #6350
6350: Make IncorrectDiagnostic match rustc by copying rustc's code. r=popzxc a=ArifRoktim

This closes #6343 and closes #6345.

The old algorithm which used a `DetectedCase` enum, didn't match how rustc thinks of cases. Some inputs can be interpreted as more than 1 case depending on the situation. For example, to rustc:
- `ABCD`: Can be both camel case and upper snake case
- `X86_64`: Can be both camel case and upper snake case

I could've made `detect_case` return a collection of `DetectedCase` and then modified the other code as such, but I think using the same code rustc uses is simpler and a surefire way to achieve the same diagnostics as rustc.

Co-authored-by: Arif Roktim <arifrroktim@gmail.com>
2020-10-26 13:20:57 +00:00
..
2020-10-20 17:09:03 +02:00
2020-10-23 12:14:58 +02:00
2020-10-24 11:39:57 +03:00
2020-10-20 17:36:02 -04:00
2020-10-23 22:12:15 +00:00
2020-10-21 21:51:53 +02:00
2020-10-26 13:20:57 +00:00
2020-10-25 23:05:30 +01:00
2020-10-24 19:08:12 +00:00
2020-10-20 17:36:02 -04:00
2020-10-20 17:36:02 -04:00
2020-10-24 11:39:57 +03:00
2020-10-23 15:18:33 +02:00
2020-10-24 19:08:12 +00:00