diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-04 19:07:09 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-04 19:07:09 +0100 |
commit | 9c49f6c36e1e097f938946811d1e2f5eb70edca9 (patch) | |
tree | 544bfd290a08475b1d5250bcc5e0717779b53758 /crates/ra_ide_api/src/completion/completion_item.rs | |
parent | b6ffb1d2a3bcc94e41c95c7a086117e11ce487e5 (diff) | |
parent | a4eb1a546c7623f65823c5e249cd3c6d8c90fd8c (diff) |
Merge #1216
1216: Basic Chalk integration r=matklad a=flodiebold
This replaces the ad-hoc `implements` check by Chalk. It doesn't yet any new functionality (e.g. where clauses aren't passed to Chalk yet). The tests that exist actually work, but it needs some refactoring, currently crashes when running analysis on the RA repo, and depends on rust-lang/chalk#216 which isn't merged yet :smile:
The main work here is converting stuff back and forth and providing Chalk with the information it needs, and the canonicalization logic. Since canonicalization depends a lot on the inference table, I don't think we can currently reuse the logic from Chalk, so we need to implement it ourselves; it's not actually that complicated anyway ;) I realized that we need a `Ty::Bound` variant separate from `Ty::Param` -- these are two different things, and I think type parameters inside a function actually need to be represented in Chalk as `Placeholder` types.
~~Currently this crashes in the 'real' world because we don't yet do canonicalization when filtering method candidates. Proper canonicalization needs the inference table (to collapse different inference variables that have already been unified), but we need to be able to call the method candidate selection from the completion code... So I'm currently thinking how to best handle that :smile:~~
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/completion_item.rs')
0 files changed, 0 insertions, 0 deletions