rust/src/test/run-pass/crateresolve3.rs
2012-04-07 22:11:23 +08:00

22 lines
437 B
Rust

// xfail-fast
// aux-build:crateresolve3-1.rs
// aux-build:crateresolve3-2.rs
// verify able to link with crates with same name but different versions
// as long as no name collision on invoked functions.
mod a {
use crateresolve3(vers = "0.1");
fn f() { assert crateresolve3::f() == 10; }
}
mod b {
use crateresolve3(vers = "0.2");
fn f() { assert crateresolve3::g() == 20; }
}
fn main() {
a::f();
b::f();
}