Skip to content

XCrate typedef of trait makes ICE #3907

Closed
@brson

Description

@brson

aux trait_typedef_cc.rs:

pub trait Foo {
    fn bar();
}

trait-typedef-cc.rs:

// aux-build:trait_typedef_cc.rs
extern mod trait_typedef_cc;

type Foo = trait_typedef_cc::Foo;

struct S {
    name: int
}

impl S: Foo {
    fn bar() { }
}

fn main() {
    let s = S {
        name: 0
    };
    s.bar();
}

ICE:

rust: task failed at 'Assertion id.crate != ast::local_crate failed', /home/brian/dev/rust/src/rustc/middle/ty.rs:3508
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x5d)[0x2afcd6d9a10d]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(+0x3090d)[0x2afcd6db090d]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(upcall_fail+0x1a8)[0x2afcd6d9c838]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(_ZN2rt6rustrt16rust_upcall_fail17_74a64c4360d2dcec3_05E+0x37)[0x2afcd4df6497]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/libcore-c3ca5d77d81b46c1-0.5.so(_ZN2rt8rt_fail_17_74a64c4360d2dcec3_05E+0x67)[0x2afcd4d15967]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty13trait_methods16_6522d932c2318273_05E+0x118)[0x2afcd6052058]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-trait-systemArea: Trait systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-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