Auto merge of #17469 - roife:fix-issue-17425, r=Veykril

fix: use ItemInNs::Macros to convert ModuleItem to ItemInNs

fix #17425.

When converting `PathResolution` to `ItemInNs`, we should convert `ModuleDef::Macro` to `ItemInNs::Macros` to ensure that it can be found in `DefMap`.
This commit is contained in:
bors 2024-06-21 17:52:42 +00:00
commit 9b33872c89

View File

@ -2784,6 +2784,7 @@ fn from(module_def: ModuleDef) -> Self {
ModuleDef::Static(_) | ModuleDef::Const(_) | ModuleDef::Function(_) => {
ItemInNs::Values(module_def)
}
ModuleDef::Macro(it) => ItemInNs::Macros(it),
_ => ItemInNs::Types(module_def),
}
}