bors[bot] 184f4cbf5d
Merge #7110
7110: Deduplicate macros when offering completion r=matklad a=AdnoC

Closes https://github.com/rust-analyzer/rust-analyzer/issues/7081

When iterating over the names within the `hir_def::resolver::Scope` for a module, track what macros are in the `hir_def::item_scope::ItemScope::legacy_macros` collection for the module. When iterating over names from the prelude, do not proccess the name if it had been in the `legacy_macros` collection.

This is implemented with a `FxHashSet` in the `Scope::process_names` function that is populated when iterating over `legacy_macros` and checked when iterating over the prelude.

Alternative implementation could instead query the `legacy_macros` `FxHashMap` directly when processing names in the prelude.

Also, I'd like to add a test for this, but I'm not sure where it could be added.

Co-authored-by: AdnoC <adam.r.cutler@gmail.com>
2021-01-14 10:00:46 +00:00
..
2021-01-09 15:41:29 +01:00
2021-01-09 15:41:29 +01:00
2021-01-07 13:08:32 +08:00
2021-01-04 20:37:50 -08:00
2020-12-24 12:49:40 +01:00
2021-01-04 20:37:50 -08:00
2021-01-09 15:41:29 +01:00
2021-01-07 12:09:23 +00:00
2021-01-01 10:06:42 +01:00
2021-01-05 14:03:58 +02:00
2021-01-04 17:44:27 +02:00
2021-01-01 10:06:42 +01:00
2021-01-01 10:06:42 +01:00
2020-12-17 00:26:01 +01:00
2021-01-02 00:44:59 +01:00
2021-01-14 10:00:46 +00:00
2020-12-16 14:16:09 +01:00