-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[ICE]: Panic with recursive type + GAT #107362
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
Comments
This came up while attempting to craft a pub enum Value<F>
where
F: Functor,
{
SignedInt(F::With<i64>),
Array(Box<Value<Compose<F, Vec<()>, ()>>>),
} would allow "sharing" the tag between all the values in the array, without needing any unsafe code and without requiring boxing in the non-array case. The code with pointers was a result of trying to get passed the Sized issue, where rustc is unable to prove that |
Seems be some kind of overflow while computing layout with |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
This comment was marked as outdated.
This comment was marked as outdated.
How could that have caused this issue? That was a change in the linkage code, while this crash happens in typeck. |
Ok, after a second run I'll post a better bisection result. So, the regression really started in fd815a5 cc @compiler-errors searched nightlies: from nightly-2022-11-15 to nightly-2022-12-10 bisected with cargo-bisect-rustc v0.6.5Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2022-11-15 --end=2022-12-10 --script test.sh As mentioned before, I could not reproduce in the latest nightly. thanks @bjorn3 for the tip and sorry about the unneeded mention before! |
this seems to no longer ice with the next solver
|
Rollup merge of rust-lang#138599 - adwinwhite:recursive-overflow, r=wesleywiser avoid overflow when generating debuginfo for expanding recursive types Fixes rust-lang#135093 Fixes rust-lang#121538 Fixes rust-lang#107362 Fixes rust-lang#100618 Fixes rust-lang#115994 The overflow happens because expanding recursive types keep creating new nested types when recurring into sub fields. I fixed that by returning an empty stub node when expanding recursion is detected.
Code
Affected release channels
Rust Version
Current error output
Backtrace
Apologies for pastebin, but github rejects issues with more than 65536 char: https://pastebin.com/jsEBz8MM
Anything else?
replacing this:
By that:
brings a "normal compiler error":
Which seems pretty consistent with the error encountered with the pointer:
The text was updated successfully, but these errors were encountered: