mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 20:31:59 +00:00
In particular, the symbol generation before this change creates a lot
of symbols with the same name for different definitions. This change
makes progress on symbol uniqueness, but does not fix a couple cases
where it was unclear to me how to fix (see TODOs in `scip.rs`)
Behavior changes:
* `scip` command now reports symbol information omitted due to symbol
collisions. Iterating with this on a large codebase (Zed!) resulted in
the other improvements in this change.
* Generally fixes providing the path to nested definitions in
symbols. Instead of having special cases for a couple limited cases of
nesting, implements `Definition::enclosing_definition` and uses this
to walk definitions.
* Parameter variables are now treated like locals.
- This fixes a bug where closure captures also received symbols
scoped to the containing function. To bring back parameter
symbols I would want a way to filter these out, since they can
cause symbol collisions.
- Having symbols for them seems to be intentional in
|
||
|---|---|---|
| .. | ||
| generated | ||
| imports | ||
| prime_caches | ||
| syntax_helpers | ||
| test_data | ||
| active_parameter.rs | ||
| apply_change.rs | ||
| assists.rs | ||
| defs.rs | ||
| documentation.rs | ||
| famous_defs.rs | ||
| helpers.rs | ||
| items_locator.rs | ||
| label.rs | ||
| lib.rs | ||
| path_transform.rs | ||
| prime_caches.rs | ||
| rename.rs | ||
| rust_doc.rs | ||
| search.rs | ||
| source_change.rs | ||
| symbol_index.rs | ||
| text_edit.rs | ||
| traits.rs | ||
| ty_filter.rs | ||
| use_trivial_constructor.rs | ||