about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/constructor.rs
diff options
context:
space:
mode:
authorAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>2023-12-15 10:58:23 +0300
committerGitHub <noreply@github.com>2023-12-15 10:58:23 +0300
commit9a07292ce6152196690736b0f1a3dba44a666832 (patch)
tree8c4734204b95fe96405ee75976011cb11c7231a2 /compiler/rustc_pattern_analysis/src/constructor.rs
parent578758ae0449370d176bb26b09d4fbf9148e0b88 (diff)
parent146e345d8b311150c968b5356908cbcab39ff1cf (diff)
downloadrust-9a07292ce6152196690736b0f1a3dba44a666832.tar.gz
rust-9a07292ce6152196690736b0f1a3dba44a666832.zip
Rollup merge of #118964 - compiler-errors:resolve, r=aliemjay
Opportunistically resolve region var in canonicalizer (instead of resolving root var)

See comment in `compiler/rustc_type_ir/src/infcx.rs`.

The **root** infer region for a given region vid may not actually be nameable from the universe of the original vid. That means that the assertion in the canonicalizer was too strict, since the `EagerResolver` that we use before canonicalizing is doing only as much resolving as it can.

This replaces `resolve_lt_var` and `probe_lt_var` in the `rustc_type_ir` API with `opportunistic_resolve_lt_var`, which acts as you expect it should. I left a FIXME that complains about the inconsistency.

This test is really gnarly, but I have no idea how to minimize it, since it seems to kind of just be coincidental that it triggered this issue. I hope the underlying root cause is easy enough to understand, though.

r? `@lcnr` or `@aliemjay`

Fixes #118950
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/constructor.rs')
0 files changed, 0 insertions, 0 deletions