diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-30 04:21:20 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-30 04:22:14 +0000 |
| commit | 18c787f48f08352ad5167b99920c395e3d703f62 (patch) | |
| tree | 2a97d3e98868f5f1fcb508af363847e9e11f7105 /compiler/rustc_resolve/src | |
| parent | 2196affd0165ee2352522d33544447c61d351937 (diff) | |
| download | rust-18c787f48f08352ad5167b99920c395e3d703f62.tar.gz rust-18c787f48f08352ad5167b99920c395e3d703f62.zip | |
Fix up partial res of segment in primitive resolution hack
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 0d23ae501f0..606d25c558a 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -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)) => { |
