]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/extern-prelude-from-opaque-fail.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / hygiene / extern-prelude-from-opaque-fail.rs
1 #![feature(decl_macro)]
2
3 macro a() {
4     extern crate core as my_core;
5     mod v {
6         // Early resolution.
7         use my_core; //~ ERROR unresolved import `my_core`
8     }
9     mod u {
10         // Late resolution.
11         fn f() { my_core::mem::drop(0); }
12         //~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
13     }
14 }
15
16 a!();
17
18 mod v {
19     // Early resolution.
20     use my_core; //~ ERROR unresolved import `my_core`
21 }
22 mod u {
23     // Late resolution.
24     fn f() { my_core::mem::drop(0); }
25     //~^ ERROR failed to resolve: use of undeclared crate or module `my_core`
26 }
27
28 fn main() {}