aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/src/nameres/collector.rs21
1 files changed, 9 insertions, 12 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index 221a5a556..0e741194b 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -948,20 +948,17 @@ impl DefCollector<'_> {
948 // incrementality). 948 // incrementality).
949 let err = self.db.macro_expand_error(macro_call_id); 949 let err = self.db.macro_expand_error(macro_call_id);
950 if let Some(err) = err { 950 if let Some(err) = err {
951 if let MacroCallId::LazyMacro(id) = macro_call_id { 951 let loc: MacroCallLoc = self.db.lookup_intern_macro(macro_call_id);
952 let loc: MacroCallLoc = self.db.lookup_intern_macro(id);
953 952
954 let diag = match err { 953 let diag = match err {
955 hir_expand::ExpandError::UnresolvedProcMacro => { 954 hir_expand::ExpandError::UnresolvedProcMacro => {
956 // Missing proc macros are non-fatal, so they are handled specially. 955 // Missing proc macros are non-fatal, so they are handled specially.
957 DefDiagnostic::unresolved_proc_macro(module_id, loc.kind) 956 DefDiagnostic::unresolved_proc_macro(module_id, loc.kind)
958 } 957 }
959 _ => DefDiagnostic::macro_error(module_id, loc.kind, err.to_string()), 958 _ => DefDiagnostic::macro_error(module_id, loc.kind, err.to_string()),
960 }; 959 };
961 960
962 self.def_map.diagnostics.push(diag); 961 self.def_map.diagnostics.push(diag);
963 }
964 // FIXME: Handle eager macros.
965 } 962 }
966 963
967 // Then, fetch and process the item tree. This will reuse the expansion result from above. 964 // Then, fetch and process the item tree. This will reuse the expansion result from above.