rust/compiler/rustc_resolve/src
Matthias Krüger a4adc005a1
Rollup merge of #139127 - compiler-errors:prim-ty-hack, r=oli-obk
Fix up partial res of segment in primitive resolution hack

There is a hack in the resolver:

```
// In `a(::assoc_item)*` `a` cannot be a module. If `a` does resolve to a module we
// don't report an error right away, but try to fallback to a primitive type.
```

This fixes up the resolution for primitives which would otherwise resolve to a module, but we weren't also updating the res of the path segment, leading to weird diagnostics.

We explicitly call `self.r.partial_res_map.insert` instead of `record_partial_res` b/c we have recorded a partial res already, and we specifically want to override it.

cc https://github.com/rust-lang/rust/issues/139095#issuecomment-2764371934
2025-04-14 18:15:30 +02:00
..
late Rename some name variables as ident. 2025-04-10 09:30:55 +10:00
build_reduced_graph.rs Avoid storing the LocalDefId twice 2025-04-11 10:04:27 +00:00
check_unused.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
def_collector.rs Address review comments. 2025-04-01 16:07:23 +11:00
diagnostics.rs Avoid a reverse map that is only used in diagnostics paths 2025-04-11 09:33:38 +00:00
effective_visibilities.rs Move ast::Item::ident into ast::ItemKind. 2025-04-01 14:08:57 +11:00
errors.rs Allow builtin macros to be used more than once. 2025-03-19 14:12:47 +01:00
ident.rs Avoid an empty trait name in impl blocks. 2025-04-09 15:01:14 +10:00
imports.rs Only compute the DefId when a diagnostic is definitely emitted 2025-04-11 10:04:27 +00:00
late.rs Rollup merge of #139127 - compiler-errors:prim-ty-hack, r=oli-obk 2025-04-14 18:15:30 +02:00
lib.rs Rollup merge of #139662 - nnethercote:tweak-DefPathData, r=compiler-errors 2025-04-11 21:21:01 +02:00
macros.rs Avoid a node_id_to_def_id call by just storing DefIds instead of NodeIds 2025-04-11 10:04:27 +00:00
rustdoc.rs rustc_resolve: prevent iteration of refids for completeness 2025-03-27 12:39:48 -04:00