1 // This is an equivalent of issue #50504, but for declarative macros.
3 #![feature(decl_macro, rustc_attrs)]
5 macro genmod($FromOutside: ident, $Outer: ident) {
9 type A = $FromOutside; // `FromOutside` shouldn't be available from here
10 type Inner = $Outer; // `Outer` shouldn't be available from here
14 #[rustc_macro_transparency = "transparent"]
15 macro genmod_transparent() {
19 type A = FromOutside; //~ ERROR cannot find type `FromOutside` in this scope
20 type Inner = Outer; //~ ERROR cannot find type `Outer` in this scope
24 macro_rules! genmod_legacy { () => {
28 type A = FromOutside; //~ ERROR cannot find type `FromOutside` in this scope
29 type Inner = Outer; //~ ERROR cannot find type `Outer` in this scope
35 genmod!(FromOutside, Outer); //~ ERROR cannot find type `FromOutside` in this scope
36 //~| ERROR cannot find type `Outer` in this scope
39 fn check_transparent() {
41 genmod_transparent!();