Skip to content

ICE while switching a type definition between enum and trait #62751

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

Closed
topecongiro opened this issue Jul 17, 2019 · 2 comments
Closed

ICE while switching a type definition between enum and trait #62751

topecongiro opened this issue Jul 17, 2019 · 2 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@topecongiro
Copy link
Contributor

I have observed an ICE when I run cargo check. At that time I was switching a type definition between enum and trait on my own type.

At first I was using a trait:

trait Block {
 // ...
}

on implementing it further I realized that I needed to use GAT, so I switched to using an enum:

enum Block {
  // ...
}

and then I encountered the ICE.

The error message is as follows:

error: internal compiler error: src/librustc/dep_graph/graph.rs:688: DepNode Hir(rustfmt_nightly[590c]::visitable[0]::Block[0]::items[0]) should have been pre-allocated but wasn't.

The ICE disappeared after I run cargo clean. I have not yet able to reproduce it. I will update this issue once I come up with a minimal working example.

rustc version

rustc 1.38.0-nightly (07e0c3651 2019-07-16)

@jonas-schievink jonas-schievink added A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 17, 2019
@hellow554
Copy link
Contributor

Maybe related to #62649 ?

@jonas-schievink
Copy link
Contributor

Yeah, looks like a pretty clear duplicate. Closing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants