forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for mixing types from two incompatible crate versions
- Loading branch information
Showing
5 changed files
with
133 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
//@ edition:2021 | ||
//@ aux-build:multiple-dep-versions-2.rs | ||
extern crate dependency; | ||
pub use dependency::do_something; |
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,7 @@ | ||
#![crate_name="dependency"] | ||
//@ edition:2021 | ||
//@ compile-flags: -C metadata=1 -C extra-filename=-1 | ||
pub struct Type; | ||
pub trait Trait {} | ||
impl Trait for Type {} | ||
pub fn do_something<X: Trait>(_: X) { } |
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,7 @@ | ||
#![crate_name="dependency"] | ||
//@ edition:2021 | ||
//@ compile-flags: -C metadata=2 -C extra-filename=-2 | ||
pub struct Type(pub i32); | ||
pub trait Trait {} | ||
impl Trait for Type {} | ||
pub fn do_something<X: Trait>(_: X) {} |
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,14 @@ | ||
//@ aux-build:dep-2-reexport.rs | ||
//@ aux-build:multiple-dep-versions-1.rs | ||
//@ edition:2021 | ||
//@ compile-flags: --error-format=human --color=always --crate-type bin --extern dependency={{build-base}}/crate-loading/multiple-dep-versions/auxiliary/libdependency-1.so --extern dep_2_reexport={{build-base}}/crate-loading/multiple-dep-versions/auxiliary/libdep_2_reexport.so | ||
//@ ignore-windows | ||
|
||
extern crate dependency; | ||
extern crate dep_2_reexport; | ||
use dependency::Type; | ||
use dep_2_reexport::do_something; | ||
|
||
fn main() { | ||
do_something(Type); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.