]> git.proxmox.com Git - rustc.git/blame - src/test/ui/hygiene/cross-crate-glob-hygiene.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / hygiene / cross-crate-glob-hygiene.rs
CommitLineData
3c0e092e
XL
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
8extern crate use_by_macro;
9
10use use_by_macro::*;
11
12mod m {
13 use use_by_macro::*;
14
15 my_struct!(define);
16}
17
18use m::*;
19
20fn main() {
21 let x = my_struct!(create);
22 //~^ ERROR cannot find struct, variant or union type `MyStruct` in this scope
23}