]> git.proxmox.com Git - rustc.git/blob - src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs
New upstream version 1.44.1+dfsg1
[rustc.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() {}