2018-09-29 01:31:54 +03:00
|
|
|
//@ aux-build:two_macros.rs
|
|
|
|
|
|
|
|
macro_rules! define_vec {
|
|
|
|
() => {
|
|
|
|
extern crate std as Vec;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
define_vec!();
|
|
|
|
|
|
|
|
mod m {
|
|
|
|
fn check() {
|
|
|
|
Vec::panic!(); //~ ERROR `Vec` is ambiguous
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-21 01:28:07 +03:00
|
|
|
macro_rules! define_other_core {
|
|
|
|
() => {
|
|
|
|
extern crate std as core;
|
|
|
|
//~^ ERROR macro-expanded `extern crate` items cannot shadow names passed with `--extern`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
define_other_core!();
|
|
|
|
|
2018-09-29 01:31:54 +03:00
|
|
|
fn main() {}
|