diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-26 13:20:57 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-26 13:20:57 +0000 |
commit | 29f5154d1c664c8fb1dfae45281873ed97a68a55 (patch) | |
tree | 74bff4f88c0d467d38c47a42d421e2e7c88d6f56 /crates/vfs | |
parent | 35ed3d2c005fdb0ec9ab78a52b31758bd7de298e (diff) | |
parent | afb2166aeb038f7c2587402db390510640b6f4fc (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/vfs')
0 files changed, 0 insertions, 0 deletions