]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[rust.git] / src / test / ui / imports / extern-prelude-extern-crate-restricted-shadowing.rs
1 // aux-build:two_macros.rs
2
3 macro_rules! define_vec {
4     () => {
5         extern crate std as Vec;
6     }
7 }
8
9 define_vec!();
10
11 mod m {
12     fn check() {
13         Vec::panic!(); //~ ERROR `Vec` is ambiguous
14     }
15 }
16
17 macro_rules! define_other_core {
18     () => {
19         extern crate std as core;
20         //~^ ERROR macro-expanded `extern crate` items cannot shadow names passed with `--extern`
21     }
22 }
23
24 define_other_core!();
25
26 fn main() {}