aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/collector.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-01-27 18:16:29 +0000
committerJonas Schievink <[email protected]>2021-01-27 18:16:39 +0000
commitad254f4c972b7a211fe2ebae4ecea47a79d02d9b (patch)
tree0008faa828f5eea1ff03c0436c13c5afbd40a73c /crates/hir_def/src/nameres/collector.rs
parent0ebf548ab7e00676d8ca43d6617c30c1ea840fc7 (diff)
Fix legacy macro resolution in block expressions
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
-rw-r--r--crates/hir_def/src/nameres/collector.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index 393170b32..761b29c86 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -1443,7 +1443,10 @@ impl ModCollector<'_, '_> {
1443 if let Some(macro_call_id) = 1443 if let Some(macro_call_id) =
1444 ast_id.as_call_id(self.def_collector.db, self.def_collector.def_map.krate, |path| { 1444 ast_id.as_call_id(self.def_collector.db, self.def_collector.def_map.krate, |path| {
1445 path.as_ident().and_then(|name| { 1445 path.as_ident().and_then(|name| {
1446 self.def_collector.def_map[self.module_id].scope.get_legacy_macro(&name) 1446 self.def_collector
1447 .def_map
1448 .ancestor_maps(self.module_id)
1449 .find_map(|(map, module)| map[module].scope.get_legacy_macro(&name))
1447 }) 1450 })
1448 }) 1451 })
1449 { 1452 {