mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Reduce allocations in attribute collection
This commit is contained in:
parent
c08df0f1f5
commit
cc04cfc982
9 changed files with 61 additions and 70 deletions
|
@ -117,7 +117,7 @@ impl ChildBySource for ItemScope {
|
|||
|(ast_id, calls)| {
|
||||
let adt = ast_id.to_node(db.upcast());
|
||||
calls.for_each(|(attr_id, calls)| {
|
||||
if let Some(Either::Right(attr)) =
|
||||
if let Some(Either::Left(attr)) =
|
||||
adt.doc_comments_and_attrs().nth(attr_id.ast_index as usize)
|
||||
{
|
||||
res[keys::DERIVE_MACRO_CALL].insert(attr, (attr_id, calls.into()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue