rust/crates
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
..
arena
assists Keep parens around in remove-dbg for range expressions 2020-10-25 15:36:02 +01:00
base_db More type safety around names 2020-10-20 17:09:03 +02:00
cfg cfg: move tests to separate file 2020-10-23 12:14:58 +02:00
completion Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
flycheck Update crates 2020-10-20 17:36:02 -04:00
hir Merge #6251 #6310 2020-10-23 22:12:15 +00:00
hir_def Fix name of InactiveCode diagnostic 2020-10-23 19:31:11 +02:00
hir_expand Fix typo in comment 2020-10-21 21:51:53 +02:00
hir_ty Merge #6350 2020-10-26 13:20:57 +00:00
ide Fix unary minus highlighting 2020-10-25 23:05:30 +01:00
ide_db Merge #6331 #6342 2020-10-24 19:08:12 +00:00
mbe
parser
paths
proc_macro_api Bump crossbeam-channel in crates 2020-10-13 16:57:01 +03:00
proc_macro_srv Update crates 2020-10-20 17:36:02 -04:00
proc_macro_test
profile
project_model Update crates 2020-10-20 17:36:02 -04:00
rust-analyzer Add tracing to main rust-analyzer binary 2020-10-25 13:53:38 +01:00
ssr Re-export base_db from ide_db 2020-10-24 11:39:57 +03:00
stdx Fix panic context 2020-10-23 15:18:33 +02:00
syntax Merge #6331 #6342 2020-10-24 19:08:12 +00:00
test_utils Fix indentation of inserted use statements 2020-10-24 18:25:23 +02:00
text_edit
toolchain
tt
vfs
vfs-notify Follow symlinks when walking project trees 2020-10-15 14:22:36 -04:00