Skip to content

resolve failure when setting enum discriminator to a declared const #2428

Closed
@msullivan

Description

@msullivan
const foo: int = 4 >> 1;
enum bs { thing = foo }
fn main() { assert(thing as int == foo); }

fails with

resolve-bug.rs:4:18: 4:21 error: internal error looking up a definition
resolve-bug.rs:4 enum bs { thing = foo }

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions