about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/declare.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-07 03:22:12 +0000
committerbors <bors@rust-lang.org>2024-07-07 03:22:12 +0000
commit9e27377bec1b0687cee90c27746d8e8d26f68bb4 (patch)
tree0fe403fcca620ae206e6159fc6b9372bc397bbec /compiler/rustc_codegen_llvm/src/declare.rs
parent289deb9ed78af2a042b0a326003162c4b770b121 (diff)
parentd6276b37eace2e49794679fb927b6b499e00a064 (diff)
downloadrust-9e27377bec1b0687cee90c27746d8e8d26f68bb4.tar.gz
rust-9e27377bec1b0687cee90c27746d8e8d26f68bb4.zip
Auto merge of #127404 - compiler-errors:rpitit-entailment-false-positive, r=oli-obk
Don't try to label `ObligationCauseCode::CompareImplItem` for an RPITIT, since it has no name

The old (current) trait solver has a limitation that when a where clause in param-env must be normalized using the same where clause, then we get spurious errors in `normalize_param_env_or_error`. I don't think there's an issue tracking it, but it's the root cause for many of the "fixed-by-next-solver" labeled issues.

Specifically, these errors may occur when checking predicate entailment of the GAT that comes out of desugaring RPITITs. Since we use `ObligationCauseCode::CompareImplItem` for these predicates, we try calling `item_name` on an RPITIT which fails, since the RPITIT has no name.

We simply suppress this logic when we're reporting a predicate entailment error for an RPITIT. RPITITs should never have predicate entailment errors, *by construction*, but they may due to this bug in the old solver.

Addresses the ICE in #127331, though doesn't fix the underlying issue (which is fundamental to the old solver).

r? types
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/declare.rs')
0 files changed, 0 insertions, 0 deletions