Closed
Description
Test Case
lib.rs
#![crate_name = "bar"]
#![crate_type = "rlib"]
test.rs
#![feature(phase)]
#[phase(plugin, link)]
extern crate foo;
fn main() {
}
Build
$ rustc lib.rs
$ rustc test.rs --extern foo=./libbar.rlib
Output
warning: using multiple versions of crate `bar`
test.rs:4:1: 4:18 note: used here
test.rs:4 extern crate foo;
^~~~~~~~~~~~~~~~~
note: crate name: bar
test.rs:4:1: 4:18 note: used here
test.rs:4 extern crate foo;
^~~~~~~~~~~~~~~~~
note: crate name: bar
Analysis
Use of #[phase(plugin, link)]
causes the crate to be resolved twice. Looking at debug output, a bug is causing the two resolutions to load the same crate twice with separate cnums. I believe I have identified a fix and will be submitting a PR shortly.
Metadata
Metadata
Assignees
Labels
No labels