Skip to content

ICE on enumerations referred to by submodules (submodule is declared before enum) #5900

Closed
@mstewartgallus

Description

@mstewartgallus

WIth rust 0.6 master, and incoming, I get an internal compile error:

error: internal compiler error: node_id_to_type: no type for node `expr 0 as int  id=13)`

This is a simple test case that reproduces the error:

pub mod buffer_binding {
   use super::BufferType;

   pub struct Context { handle : BufferType }
}

pub enum BufferType {
   ArrayBuffer = 0 as int
}

Strangely, the error only happens when the enumeration is defined after the submodule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions