diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-18 14:38:04 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-18 14:38:04 +0000 |
commit | 3ab9b39dd47d99ffd97f485c27f38b8944e12a3e (patch) | |
tree | 308ffffd0b61517f13aedad9621430f4c41014e3 /crates/hir_def/src/attr.rs | |
parent | 816bc7389516dda1eb4821f2ac4d5993cd5611dd (diff) | |
parent | b84efbaacfc980ba167edc145aa7ca5d738448ff (diff) |
Merge #8087
8087: Make MacroDefId's `AstId` mandatory when possible r=jonas-schievink a=jonas-schievink
This makes it clearer (in the type definition) which macros have or don't have an `AstId`
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/attr.rs')
-rw-r--r-- | crates/hir_def/src/attr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index e4c84afbf..8d925c0c1 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs | |||
@@ -209,7 +209,7 @@ impl Attrs { | |||
209 | }, | 209 | }, |
210 | AttrDefId::TraitId(it) => attrs_from_item_tree(it.lookup(db).id, db), | 210 | AttrDefId::TraitId(it) => attrs_from_item_tree(it.lookup(db).id, db), |
211 | AttrDefId::MacroDefId(it) => { | 211 | AttrDefId::MacroDefId(it) => { |
212 | it.ast_id.map_or_else(Default::default, |ast_id| attrs_from_ast(ast_id, db)) | 212 | it.ast_id().map_or_else(Default::default, |ast_id| attrs_from_ast(ast_id, db)) |
213 | } | 213 | } |
214 | AttrDefId::ImplId(it) => attrs_from_item_tree(it.lookup(db).id, db), | 214 | AttrDefId::ImplId(it) => attrs_from_item_tree(it.lookup(db).id, db), |
215 | AttrDefId::ConstId(it) => attrs_from_item_tree(it.lookup(db).id, db), | 215 | AttrDefId::ConstId(it) => attrs_from_item_tree(it.lookup(db).id, db), |