Skip to content

ICE type checking incorrect impl decl #2330

Closed
@brson

Description

@brson
enum chan { }

iface channel<T> {
    fn send(v: T);
}

// `chan` is not an iface, it's an enum
impl of chan for int {
    fn send(v: int) { fail }
}

fn main() {
}
rust: upcall fail 'non-exhaustive match failure', /home/banderson/Dev/rust3/src/rustc/middle/typeck.rs:1507
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', /home/banderson/Dev/rust3/src/rustc/driver/rustc.rs:232
rust: domain main @0x2615f10 root task failed
rust: upcall fail 'killed', /home/banderson/Dev/rust3/src/libcore/task.rs:454

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemI-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