Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | crates/hir-expand/src/lib.rs | 4 | ||||
| -rw-r--r-- | crates/hir/src/semantics.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-expand/src/lib.rs b/crates/hir-expand/src/lib.rs index c0b0a61456..d205b72e9a 100644 --- a/crates/hir-expand/src/lib.rs +++ b/crates/hir-expand/src/lib.rs @@ -790,9 +790,9 @@ fn expand_unimplemented_builtin_macro(span: Span) -> ExpandResult<tt::TopSubtree fn proc_macro_span(db: &dyn ExpandDatabase, ast: AstId<ast::Fn>) -> Span { #[salsa::tracked] fn proc_macro_span(db: &dyn ExpandDatabase, ast: AstId<ast::Fn>, _: ()) -> Span { - let root = ast.file_id.parse_or_expand(db); + let (parse, span_map) = ast.file_id.parse_with_map(db); + let root = parse.syntax_node(); let ast_id_map = ast.file_id.ast_id_map(db); - let span_map = ast.file_id.span_map(db); let node = ast_id_map.get(ast.value).to_node(&root); let range = ast::HasName::name(&node) diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 02cec440e1..bd2c84bb55 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs @@ -1980,7 +1980,7 @@ impl<'db> SemanticsImpl<'db> { } pub fn resolve_macro_call_arm(&self, macro_call: &ast::MacroCall) -> Option<u32> { - self.to_def(macro_call)?.parse_macro_expansion(self.db).value.1.matched_arm + self.to_def(macro_call)?.expansion_span_map(self.db).matched_arm } pub fn get_unsafe_ops(&self, def: ExpressionStoreOwner) -> FxHashSet<ExprOrPatSource> { |