Closed
Description
Each revision of this test is an ICE in 1.75.0-nightly (2023-10-17 09df610):
// revisions: sized clone
#[cfg(sized)] fn rpit() -> impl Sized {}
#[cfg(clone)] fn rpit() -> impl Clone {}
fn same_output<Out>(_: impl Fn() -> Out, _: impl Fn() -> Out) {}
pub fn foo() -> impl Sized {
same_output(rpit, foo);
same_output(foo, rpit);
rpit()
}
Both revisions have a somewhat convoluted history best shown in a table form:
sized |
clone |
|
---|---|---|
stable 1.73 | PASS 🆗 | ICE 🧊 |
#114586 (1.74.0-beta) | PASS 🆗 | PASS 🆗 |
#116530 (1.75.0-nightly) | ICE 🧊 | ICE 🧊 |
While it may seem like #116530 is the culprit, I'd argue that the PR #114586 introduced an incomplete fix that I don't believe we should commit to in stable. Additionally, reverting #114586 while keeping #116530 would fix sized
version as well as an other regression #114586 (comment), making it the right choice in my opinion.
Metadata
Metadata
Assignees
Labels
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Category: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Critical priorityRelevant to the types team, which will review and decide on the PR/issue.Performance or correctness regression from stable to nightly.