Skip to content

ICE with exporting a type and impl from a crate #2414

Closed
@erickt

Description

@erickt

Here's the test case. First file a.rs is:

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

type t1 = uint;
impl t2 for str { }

Second b.rs is:


#[link(name = "b", vers = "0.1")];
#[crate_type = "lib"];

use a;

import a::t2;
export t2;

This errors out with:

../run-rustc -L . a.rs
warning: no debug symbols in executable (-arch x86_64)
../run-rustc -L . b.rs
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

Other than the metadata, if anything else is removed the program compiles fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-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