Repository navigation
ICE: Normalizing Binder without wrapping in a Binder #95421
Description
Activity
- addedC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
on Mar 28, 2022 - addedregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
on Mar 28, 2022 output from bisect:
looking for regression commit between 2021-09-01 and 2021-09-02 cloning rust repository fetching (via local git) commits from 29ef6cf1637aa8317f8911f93f14e18d404c1b0e to 50171c310cd15e1b2d3723766ce64e2e4d6696fc refreshing repository at "rust.git" From https://github.com/rust-lang/rust * branch HEAD -> FETCH_HEAD opening existing repository at "rust.git" looking up first commit looking up second commit checking that commits are by bors and thus have ci artifacts... finding bors merge commits found 9 bors merge commits in the specified range commit[0] 2021-08-31UTC: Auto merge of #88506 - Mark-Simulacrum:fix-rlibs, r=ehuss commit[1] 2021-08-31UTC: Auto merge of #88533 - oli-obk:tait_🧊, r=spastorino commit[2] 2021-09-01UTC: Auto merge of #87688 - camsteffen:let-else, r=cjgillot commit[3] 2021-09-01UTC: Auto merge of #88121 - camelid:better-recursive-alias-error, r=estebank commit[4] 2021-09-01UTC: Auto merge of #88272 - willcrichton:mutable-sparse-matrix, r=ecstatic-morse commit[5] 2021-09-01UTC: Auto merge of #88556 - m-ou-se:rollup-q636wyd, r=m-ou-se commit[6] 2021-09-01UTC: Auto merge of #88395 - ricky26:llvm-submodule, r=nikic commit[7] 2021-09-01UTC: Auto merge of #88269 - prconrad:doctest-persist-binaries, r=jyn514 commit[8] 2021-09-01UTC: Auto merge of #88563 - ehuss:update-cargo-books, r=ehuss@Dylan-DPC, I got the same bisection as you, but then realized it was because #88563 added support for
edition = "2021"in cargo, and before 2021-09-01, it wasn't ICEing but failing to cargo-build (which makes bisect-rustc think it regressed there).I don't think this code ever worked. Before 1.56 (when @jackh726 added the wonderful #85499), rustc ICEs with failure to relate late-bound and placeholder regions, and after 1.56, we fail with this binder variable issue. The library example provided above only newly begins to fail between 1.41 and 1.42 because someone added a check related to const prop that caused the predicate to be evaluated eagerly, but the binary version has always ICEd in some form.
The bug
This is probably a bug because we overwrite the late-bound regions we collect here in the where-clause (which we attach to the HIR id of the type in the LHS of
Ty: Trait + Trait) with the ones we collect here when visiting thefntype.Not exactly sure what the best way to fix this bug is. I'll play around with solutions, but don't want to claim the issue because I think it's a bit above my pay-grade, so to speak, since I know very little about
rustc_resolve::late::lifetimes.Reacted by Dylan DPCHeh this is weird. I was actually confused for a bit, because it looked like
'xwas bound everywhere. But it's it a bit ambiguous where thefor<'x>should go: on the fn or on the TraitRef.Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.
@rustbot label -I-prioritize +P-medium
- addedP-mediumMedium priorityMedium priorityand removedI-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
on Mar 30, 2022 I don't think this code ever worked. Before 1.56 (when @jackh726 added the wonderful #85499), rustc ICEs with failure to relate late-bound and placeholder regions, and after 1.56, we fail with this binder variable issue. The library example provided above only newly begins to fail between 1.41 and 1.42 because someone added a check related to const prop that caused the predicate to be evaluated eagerly, but the binary version has always ICEd in some form.
Ah, sorry for not catching that -- I probably wouldn't have filed it as a regression if I had (though I guess it is still technically one).
- addedglacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
on Apr 26, 2022 - removedI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
on Sep 23, 2023
Code
Library version (choose "Build" from the pulldown):
Binary version:
The two have (slightly) differing output. Note: If you compile as a binary but don't call the problematic function, compilation succeeds. Compiling as a library ICEs even when the function is private.
Meta
Error output
Library version
Binary version
Backtrace (Library version)
Backtrace (Binary version)
Version it worked on
Works on
1.41.0. Works on versions prior to this down to1.7.0(spot checked). (Version1.6.0gives obsoleted errorE0193.)Versions with regression
Versions
1.42.0and up (spot checked). The error changes between1.54.0and1.55.0.@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged