2018-09-29 01:31:54 +03:00
|
|
|
//@ aux-build:two_macros.rs
|
2018-10-24 01:03:47 +03:00
|
|
|
//@ compile-flags:--extern non_existent
|
2018-09-29 01:31:54 +03:00
|
|
|
|
|
|
|
mod n {
|
|
|
|
extern crate two_macros;
|
|
|
|
}
|
|
|
|
|
|
|
|
mod m {
|
|
|
|
fn check() {
|
2020-08-27 13:27:14 +01:00
|
|
|
two_macros::m!(); //~ ERROR failed to resolve: use of undeclared crate or module `two_macros`
|
2018-09-29 01:31:54 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-24 01:03:47 +03:00
|
|
|
macro_rules! define_std_as_non_existent {
|
|
|
|
() => {
|
|
|
|
extern crate std as non_existent;
|
|
|
|
//~^ ERROR `extern crate` items cannot shadow names passed with `--extern`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
define_std_as_non_existent!();
|
|
|
|
|
2018-09-29 01:31:54 +03:00
|
|
|
fn main() {}
|