Workaround issues with crate loading during cross-compilation

This commit is contained in:
Vadim Petrochenkov 2018-12-18 03:21:28 +03:00
parent f756257fb7
commit edab6c7492
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,4 @@
// edition:2018
// compile-flags:--extern dollar_crate --extern dollar_crate_external
// aux-build:dollar-crate.rs
// aux-build:dollar-crate-external.rs
@ -7,9 +6,14 @@
// normalize-stdout-test "bytes\([^0]\w*\.\.(\w+)\)" -> "bytes(LO..$1)"
// normalize-stdout-test "bytes\((\w+)\.\.[^0]\w*\)" -> "bytes($1..HI)"
extern crate dollar_crate;
extern crate dollar_crate_external;
type S = u8;
mod local {
use crate::dollar_crate;
macro_rules! local {
() => {
dollar_crate::m! {
@ -28,6 +32,8 @@ mod local {
}
mod external {
use crate::dollar_crate_external;
dollar_crate_external::external!(); //~ ERROR the name `D` is defined multiple times
}

View File

@ -1,5 +1,5 @@
error[E0428]: the name `D` is defined multiple times
--> $DIR/dollar-crate.rs:23:13
--> $DIR/dollar-crate.rs:27:13
|
LL | struct D($crate::S); //~ ERROR the name `D` is defined multiple times
| ^^^^^^^^^^^^^^^^^^^^
@ -13,7 +13,7 @@ LL | local!();
= note: `D` must be defined only once in the type namespace of this module
error[E0428]: the name `D` is defined multiple times
--> $DIR/dollar-crate.rs:31:5
--> $DIR/dollar-crate.rs:37:5
|
LL | dollar_crate_external::external!(); //~ ERROR the name `D` is defined multiple times
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^