aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/collector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
-rw-r--r--crates/hir_def/src/nameres/collector.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index 221a5a556..54e9c8d20 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -367,6 +367,8 @@ impl DefCollector<'_> {
367 /// This improves UX when proc macros are turned off or don't work, and replicates the behavior 367 /// This improves UX when proc macros are turned off or don't work, and replicates the behavior
368 /// before we supported proc. attribute macros. 368 /// before we supported proc. attribute macros.
369 fn reseed_with_unresolved_attributes(&mut self) -> ReachedFixedPoint { 369 fn reseed_with_unresolved_attributes(&mut self) -> ReachedFixedPoint {
370 cov_mark::hit!(unresolved_attribute_fallback);
371
370 let mut added_items = false; 372 let mut added_items = false;
371 let unexpanded_macros = std::mem::replace(&mut self.unexpanded_macros, Vec::new()); 373 let unexpanded_macros = std::mem::replace(&mut self.unexpanded_macros, Vec::new());
372 for directive in &unexpanded_macros { 374 for directive in &unexpanded_macros {
@@ -391,7 +393,9 @@ impl DefCollector<'_> {
391 added_items = true; 393 added_items = true;
392 } 394 }
393 } 395 }
394 self.unexpanded_macros = unexpanded_macros; 396
397 // The collection above might add new unresolved macros (eg. derives), so merge the lists.
398 self.unexpanded_macros.extend(unexpanded_macros);
395 399
396 if added_items { 400 if added_items {
397 // Continue name resolution with the new data. 401 // Continue name resolution with the new data.