Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check version when resolving transitive dependent crates
Issue #2138
- Loading branch information
Showing
6 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#[link(name = "crateresolve4a", vers = "0.1")]; | ||
#[crate_type = "lib"]; | ||
|
||
fn f() -> int { 10 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#[link(name = "crateresolve4a", vers= "0.2")]; | ||
#[crate_type = "lib"]; | ||
|
||
fn g() -> int { 20 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// aux-build:crateresolve4a-1.rs | ||
// aux-build:crateresolve4a-2.rs | ||
#[link(name = "crateresolve4b", vers = "0.1")]; | ||
#[crate_type = "lib"]; | ||
|
||
use crateresolve4a(vers="0.2"); | ||
|
||
fn f() -> int { crateresolve4a::g() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// aux-build:crateresolve4a-1.rs | ||
// aux-build:crateresolve4a-2.rs | ||
#[link(name = "crateresolve4b", vers = "0.2")]; | ||
#[crate_type = "lib"]; | ||
|
||
use crateresolve4a(vers="0.1"); | ||
|
||
fn g() -> int { crateresolve4a::f() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// xfail-fast | ||
// aux-build:crateresolve4a-1.rs | ||
// aux-build:crateresolve4a-2.rs | ||
// aux-build:crateresolve4b-1.rs | ||
// aux-build:crateresolve4b-2.rs | ||
|
||
mod a { | ||
use crateresolve4b(vers = "0.1"); | ||
fn f() { assert crateresolve4b::f() == 20; } | ||
} | ||
|
||
mod b { | ||
use crateresolve4b(vers = "0.2"); | ||
fn f() { assert crateresolve4b::g() == 10; } | ||
} | ||
|
||
fn main() { | ||
a::f(); | ||
b::f(); | ||
} |
7aaa120
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\o/