]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/cross-crate-glob-hygiene.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / hygiene / cross-crate-glob-hygiene.rs
1 // Check that globs cannot import hygienic identifiers from a macro expansion
2 // in another crate. `my_struct` is a `macro_rules` macro, so the struct it
3 // defines is only not imported because `my_struct` is defined by a macros 2.0
4 // macro.
5
6 // aux-build:use_by_macro.rs
7
8 extern crate use_by_macro;
9
10 use use_by_macro::*;
11
12 mod m {
13     use use_by_macro::*;
14
15     my_struct!(define);
16 }
17
18 use m::*;
19
20 fn main() {
21     let x = my_struct!(create);
22     //~^ ERROR cannot find struct, variant or union type `MyStruct` in this scope
23 }