Encode one level of cfg_attr in attr_id

This commit is contained in:
Lukas Wirth 2023-01-09 20:47:51 +01:00
parent 68723043db
commit 621e96bd6a
11 changed files with 99 additions and 52 deletions

View file

@ -117,7 +117,7 @@ impl ChildBySource for ItemScope {
let adt = ast_id.to_node(db.upcast());
calls.for_each(|(attr_id, call_id, calls)| {
if let Some(Either::Left(attr)) =
adt.doc_comments_and_attrs().nth(attr_id.ast_index as usize)
adt.doc_comments_and_attrs().nth(attr_id.ast_index())
{
res[keys::DERIVE_MACRO_CALL].insert(attr, (attr_id, call_id, calls.into()));
}