mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Basic support for decl macros 2.0
This commit is contained in:
parent
bd4c352831
commit
c31c3246a8
15 changed files with 195 additions and 28 deletions
|
@ -157,7 +157,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
let file_id = src.file_id.original_file(self.db.upcast());
|
||||
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));
|
||||
let ast_id = Some(AstId::new(src.file_id, file_ast_id.upcast()));
|
||||
Some(MacroDefId { krate: Some(krate), ast_id, kind, local_inner: false })
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue