diff options
author | Aleksey Kladov <[email protected]> | 2021-03-15 12:02:48 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-03-15 12:12:39 +0000 |
commit | af2366acdf1321702e54e01c88052ed5a674716c (patch) | |
tree | 5a9d98a215a2adf82dbd2d3c9b74602e0c7debf8 /crates/ide_assists | |
parent | 5138baf2ac742de601f29d22fc64e386da56c4c2 (diff) |
Goto definition works for `S { a: }` case
What happens here is that we lower `: ` to a missing expression, and
then correctly record that the corresponding field expression resolves
to a specific field. Where we fail is in the mapping of syntax to this
missing expression. Doing it via `ast_field.expr()` fails, as that
expression is `None`. Instead, we go in the opposite direcition and ask
each lowered field about its source.
This works, but has wrong complexity `O(N)` and, really, the
implementation is just too complex. We need some better management of
data here.
Diffstat (limited to 'crates/ide_assists')
0 files changed, 0 insertions, 0 deletions