Make macro def krate mandatory

Refactors builtin derive support to go through proper name resolution
This commit is contained in:
Jonas Schievink 2020-12-15 20:33:05 +01:00
parent c31c3246a8
commit b238ddd21a
14 changed files with 91 additions and 42 deletions

View file

@ -158,7 +158,7 @@ impl SourceToDefCtx<'_, '_> {
let krate = self.file_to_def(file_id)?.krate;
let file_ast_id = self.db.ast_id_map(src.file_id).ast_id(&src.value);
let ast_id = Some(AstId::new(src.file_id, file_ast_id.upcast()));
Some(MacroDefId { krate: Some(krate), ast_id, kind, local_inner: false })
Some(MacroDefId { krate, ast_id, kind, local_inner: false })
}
pub(super) fn find_container(&mut self, src: InFile<&SyntaxNode>) -> Option<ChildContainer> {