-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler panic with generic-typed nested closures #59494
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
triage: P-high. Removing nominated tag since there's little to discuss beyond its P-highness. (The fact its unassigned will be discussed regardless of nomination state.) |
I spent some time looking at this a few weeks ago but did not manage to find anything conclusive. At this point I'm going to be taking a break for a few months, so I am unassigning myself from this issue. |
triage: assigning self. |
triage: downgrading to P-medium; this does not warrant revisiting every week. |
I was able to minify it a bit further: fn t7p<A,B>(g: impl Fn(A) -> B) -> impl Fn(A) -> B {
g
}
fn unify<A,B,C>(f: impl Fn(A) -> B, g: impl Fn(A) -> C) {}
fn unify2<A,B,C>(f:impl Fn(B) -> C, g: impl Fn(A) -> B) {}
fn main() {
let f = |(_, _)| { };
let g = |(a, _)| { a };
unify2(f, g);
let t = |env| { |a| { |b| { t7p(g)(((env, a), b)) }}};
unify(t, t7p(g));
} |
Triage: It's no longer ICE with the latest nightly. |
…agisa Add some regression tests Closes rust-lang#56229 Closes rust-lang#59494 Closes rust-lang#70746 Closes rust-lang#73229
Discovered a compiler panic, thought it might relate to #58840, but was told to post a new issue.
In minimizing, it seems the generic types are required to trigger the panic, I was unable to reproduce when inlining t7p or t8n.
This code panics on 1.33 - 1.35, but does not panic on 1.32 (playpen):
On 1.32:
On 1.35 nightly:
--Bryan
The text was updated successfully, but these errors were encountered: