1
Fork 0

Fix up partial res of segment in primitive resolution hack

This commit is contained in:
Michael Goulet 2025-03-30 04:21:20 +00:00
parent 2196affd01
commit 18c787f48f
4 changed files with 31 additions and 0 deletions

View file

@ -4598,6 +4598,11 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
}
};
// Fix up partial res of segment from `resolve_path` call.
if let Some(id) = path[0].id {
self.r.partial_res_map.insert(id, PartialRes::new(Res::PrimTy(prim)));
}
PartialRes::with_unresolved_segments(Res::PrimTy(prim), path.len() - 1)
}
PathResult::Module(ModuleOrUniformRoot::Module(module)) => {