diff options
author | Jonas Schievink <jonasschievink@gmail.com> | 2020-12-15 17:43:19 +0000 |
---|---|---|
committer | Jonas Schievink <jonasschievink@gmail.com> | 2020-12-15 17:43:34 +0000 |
commit | c31c3246a8c87a3639623c30b692a57e728bb046 (patch) | |
tree | e66cdc459e249767c69c1b29b13e85fe30bdc935 /crates/hir/src/semantics | |
parent | bd4c352831662762ee7a66da77ec9adf623b0a0a (diff) |
Basic support for decl macros 2.0
Diffstat (limited to 'crates/hir/src/semantics')
-rw-r--r-- | crates/hir/src/semantics/source_to_def.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir/src/semantics/source_to_def.rs b/crates/hir/src/semantics/source_to_def.rs index a333d7aea..d499ae340 100644 --- a/crates/hir/src/semantics/source_to_def.rs +++ b/crates/hir/src/semantics/source_to_def.rs | |||
@@ -157,7 +157,7 @@ impl SourceToDefCtx<'_, '_> { | |||
157 | let file_id = src.file_id.original_file(self.db.upcast()); | 157 | let file_id = src.file_id.original_file(self.db.upcast()); |
158 | let krate = self.file_to_def(file_id)?.krate; | 158 | let krate = self.file_to_def(file_id)?.krate; |
159 | let file_ast_id = self.db.ast_id_map(src.file_id).ast_id(&src.value); | 159 | let file_ast_id = self.db.ast_id_map(src.file_id).ast_id(&src.value); |
160 | let ast_id = Some(AstId::new(src.file_id, file_ast_id)); | 160 | let ast_id = Some(AstId::new(src.file_id, file_ast_id.upcast())); |
161 | Some(MacroDefId { krate: Some(krate), ast_id, kind, local_inner: false }) | 161 | Some(MacroDefId { krate: Some(krate), ast_id, kind, local_inner: false }) |
162 | } | 162 | } |
163 | 163 | ||