Skip to content

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

Closed
@topecongiro

Description

@topecongiro

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions