-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a recursive type with infinite size leads to ICE #61323
Comments
triage: P-high. Removing nomination. |
assigning to @nikomatsakis with expectation that they will delegate. |
nominating to try to find someone to investigate this. |
@ackxolotl well spotted ;) //revisions:rpass1 rpass2
enum A {
B(C),
}
#[cfg(rpass1)]
struct C(Box<A>);
#[cfg(rpass2)]
struct C(A);
fn main() {} |
triage: Reassigning to self and @aturon in hopes that one of us will find time to investigate, since it seems to be an issue with the dep-graph/incr-comp infrastructure. |
triage: Downgrading to P-medium. I still want to resolve this, but it simply does not warrant revisiting every week during T-compiler triage. |
I encountered the same bug. I starting to create a new issue, but it's exactly the same than this one. In case it's needed, I uploaded the code on this repository on the branch |
I am running into this issue as well. Since the corresponding pr has been merged 24 days ago and the latest version was tagged 14 days ago, I am not sure, if this error should have been fixed with In my case I have an enum which holds a struct which in turn references that enum. I know that this can't work and I know how the correct way of handling this scenario is, I just wanted to let you know that this crashes the compiler. If you need a more detailed code sample, let me know and I will try to reproduce the error outside of my project.
|
Creating a recursive type with infinite size by removing a
Box
leads to an internal compiler error. Might be the same issue as #57373.To reproduce this bug, run
cargo build
on this code:Replace
Box<A>
byA
and runcargo build
again:I expected to see this happen:
Instead, this happened:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: