mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
26 lines
433 B
Rust
26 lines
433 B
Rust
//@ 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
|
|
}
|
|
}
|
|
|
|
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!();
|
|
|
|
fn main() {}
|