summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-14 18:15:30 +0200
committerGitHub <noreply@github.com>2025-04-14 18:15:30 +0200
commita4adc005a19a745b1e9159841a1cbd45fca5c9af (patch)
tree03dac4e7b558ffc001db7e5adb77da3d8e5542ad /compiler/rustc_parse/src/parser/expr.rs
parentc580c498a1fe144d7c5b2dfc7faab1a229aa288b (diff)
parent18c787f48f08352ad5167b99920c395e3d703f62 (diff)
downloadrust-a4adc005a19a745b1e9159841a1cbd45fca5c9af.tar.gz
rust-a4adc005a19a745b1e9159841a1cbd45fca5c9af.zip
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
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
0 files changed, 0 insertions, 0 deletions