2018-09-28 17:31:54 -05:00
|
|
|
// aux-build:two_macros.rs
|
2018-10-23 17:03:47 -05:00
|
|
|
// compile-flags:--extern non_existent
|
2018-09-28 17:31:54 -05:00
|
|
|
|
|
|
|
mod n {
|
|
|
|
extern crate two_macros;
|
|
|
|
}
|
|
|
|
|
|
|
|
mod m {
|
|
|
|
fn check() {
|
2020-08-27 07:27:14 -05:00
|
|
|
two_macros::m!(); //~ ERROR failed to resolve: use of undeclared crate or module `two_macros`
|
2018-09-28 17:31:54 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-23 17:03:47 -05: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-28 17:31:54 -05:00
|
|
|
fn main() {}
|