rust/tests/ui/hygiene/cross-crate-glob-hygiene.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
524 B
Rust
Raw Normal View History

2021-10-28 20:48:39 +00:00
// Check that globs cannot import hygienic identifiers from a macro expansion
// in another crate. `my_struct` is a `macro_rules` macro, so the struct it
// defines is only not imported because `my_struct` is defined by a macros 2.0
// macro.
2021-10-23 11:06:58 +00:00
// aux-build:use_by_macro.rs
extern crate use_by_macro;
use use_by_macro::*;
mod m {
use use_by_macro::*;
my_struct!(define);
}
use m::*;
fn main() {
let x = my_struct!(create);
//~^ ERROR cannot find struct, variant or union type `MyStruct` in this scope
}