rust-analyzer/crates
bors 7449f9fa10 Auto merge of #13894 - lowr:patch/fallback-before-final-obligation-resolution, r=lnicola
Apply fallback before final obligation resolution

Fixes #13249
Fixes #13518

We've been applying fallback to type variables independently even when there are some unresolved obligations that associate them. This PR applies fallback to unresolved scalar type variables before the final attempt of resolving obligations, which enables us to infer more.

Unlike rustc, which has separate storages for each kind of type variables, we currently don't have a way to retrieve only integer/float type variables without folding/visiting every single type we've inferred. I've repurposed `TypeVariableData` as bitflags that also hold the kind of the type variable it's referring to so that we can "reconstruct" scalar type variables from their indices.

This PR increases the number of ??ty for rust-analyzer repo not because we regress and fail to infer the existing code but because we fail to infer the new code. It seems we have problems inferring some functions bitflags produces.
2023-01-07 19:03:34 +00:00
..
base-db Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
cfg Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
flycheck Moar linting: needless_borrow, let_unit_value, ... 2022-12-25 05:07:47 -05:00
hir Diagnose private assoc item accesses 2023-01-01 13:24:48 +01:00
hir-def Auto merge of #13854 - lowr:fix/mbe-glue-punct, r=Veykril 2023-01-02 13:07:42 +00:00
hir-expand Fix option_env expansion 2023-01-06 16:00:23 +02:00
hir-ty Apply fallback to scalar type variables before final obligation resolution 2023-01-06 06:07:08 +09:00
ide Skip lifetime elision on fn pointers and fn trait types 2023-01-03 11:58:31 +01:00
ide-assists Skip lifetime elision on fn pointers and fn trait types 2023-01-03 11:58:31 +01:00
ide-completion return immediately from render_record_lit if snippet_cap is None 2023-01-04 12:55:05 -05:00
ide-db Skip lifetime elision on fn pointers and fn trait types 2023-01-03 11:58:31 +01:00
ide-diagnostics Diagnose private assoc item accesses 2023-01-01 13:24:48 +01:00
ide-ssr Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
limit Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
mbe mbe: handle multi-character separator 2022-12-28 00:59:56 +09:00
parser Parse do yeet expressions 2022-12-28 22:42:26 +00:00
paths ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
proc-macro-api Moar linting: needless_borrow, let_unit_value, ... 2022-12-25 05:07:47 -05:00
proc-macro-srv Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
proc-macro-srv-cli ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
proc-macro-test Moar linting: needless_borrow, let_unit_value, ... 2022-12-25 05:07:47 -05:00
profile Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
project-model Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
rust-analyzer Only set machine-applicable rustc diagnostics as preferred 2023-01-03 15:46:08 +01:00
sourcegen Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
stdx Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
syntax Implement do yeet expression 2022-12-28 23:17:13 +00:00
test-utils Write down adjustments introduced by binary operators 2023-01-02 23:16:09 +01:00
text-edit ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
toolchain Moar linting: needless_borrow, let_unit_value, ... 2022-12-25 05:07:47 -05:00
tt Inline all format arguments where possible 2022-12-24 14:36:10 -05:00
vfs derive 'Hash' 2022-12-30 11:14:15 +00:00
vfs-notify ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00