rust/tests/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
432 B
Rust
Raw Normal View History

// 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-20 16:28:07 -06: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!();
fn main() {}