diff options
Diffstat (limited to 'src/test/ui/hygiene/arguments.rs')
-rw-r--r-- | src/test/ui/hygiene/arguments.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/hygiene/arguments.rs b/src/test/ui/hygiene/arguments.rs new file mode 100644 index 000000000..f0f732f4c --- /dev/null +++ b/src/test/ui/hygiene/arguments.rs @@ -0,0 +1,17 @@ +// ignore-pretty pretty-printing is unhygienic + +#![feature(decl_macro)] + +macro m($t:ty, $e:expr) { + mod foo { + #[allow(unused)] + struct S; + pub(super) fn f(_: $t) {} + } + foo::f($e); +} + +fn main() { + struct S; + m!(S, S); //~ ERROR cannot find type `S` in this scope +} |