Skip to content

Can't link to multiple versions of the same crate #2137

Closed
@brson

Description

@brson

I'll be checking this in under run-pass/crateresolve2.rs

// xfail-test
// aux-build:crateresolve-1.rs
// aux-build:crateresolve-2.rs
// aux-build:crateresolve-3.rs

mod a {
    use crateresolve(vers = "0.1");
    fn f() { assert crateresolve::f() == 10; }
}

mod b {
    use crateresolve(vers = "0.2");
    fn f() { assert crateresolve::f() == 20; }
}

mod c {
    use crateresolve(vers = "0.3");
    fn f() { assert crateresolve::f() == 30; }
}

fn main() {
    a::f();
    b::f();
    c::f();
}

Some of the errors make me think that #1706 is part of the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions