Skip to content

ICE with metadata, ifaces, and generic functions #2380

Closed
@erickt

Description

@erickt

Good morning,

I ran into an ICE when trying to return a generic implementation across a crate. Here's a reduced example of the bug:

https://gist.github.com/2689394

a.rs:

#[link(name = "a", vers = "0.0")];
#[crate_type = "lib"];

iface i<T> { }

fn f<T>() -> i<T> {
    impl <T> of i<T> for () { }

    () as i::<T>
}

b.rs:

use a;

fn main() {
    a::f::<()>();
}

Errors with:

./run-rustc a.rs
warning: no debug symbols in executable (-arch x86_64)
./run-rustc b.rs
rust: upcall fail 'lookup_item: id not found: 13', /Users/etryzelaar/Projects/rust/rust/src/rustc/metadata/decoder.rs:94
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', /Users/etryzelaar/Projects/rust/rust/src/rustc/driver/rustc.rs:248
rust: domain main @0x103000010 root task failed
rust: upcall fail 'killed', /Users/etryzelaar/Projects/rust/rust/src/libcore/task.rs:454
make: *** [all] Error 101

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binaries

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions