aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/attr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/attr.rs')
-rw-r--r--crates/ra_hir_def/src/attr.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/attr.rs b/crates/ra_hir_def/src/attr.rs
index 7f9a6e7ca..2f8f02d82 100644
--- a/crates/ra_hir_def/src/attr.rs
+++ b/crates/ra_hir_def/src/attr.rs
@@ -61,7 +61,9 @@ impl Attrs {
61 AdtId::UnionId(it) => attrs_from_ast(it.lookup_intern(db).ast_id, db), 61 AdtId::UnionId(it) => attrs_from_ast(it.lookup_intern(db).ast_id, db),
62 }, 62 },
63 AttrDefId::TraitId(it) => attrs_from_ast(it.lookup_intern(db).ast_id, db), 63 AttrDefId::TraitId(it) => attrs_from_ast(it.lookup_intern(db).ast_id, db),
64 AttrDefId::MacroDefId(it) => attrs_from_ast(it.ast_id, db), 64 AttrDefId::MacroDefId(it) => {
65 it.ast_id.map_or_else(Default::default, |ast_id| attrs_from_ast(ast_id, db))
66 }
65 AttrDefId::ImplId(it) => attrs_from_ast(it.lookup_intern(db).ast_id, db), 67 AttrDefId::ImplId(it) => attrs_from_ast(it.lookup_intern(db).ast_id, db),
66 AttrDefId::ConstId(it) => attrs_from_loc(it.lookup(db), db), 68 AttrDefId::ConstId(it) => attrs_from_loc(it.lookup(db), db),
67 AttrDefId::StaticId(it) => attrs_from_loc(it.lookup(db), db), 69 AttrDefId::StaticId(it) => attrs_from_loc(it.lookup(db), db),