summaryrefslogtreecommitdiffstats
path: root/src/test/ui/hygiene/pattern-macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/hygiene/pattern-macro.rs')
-rw-r--r--src/test/ui/hygiene/pattern-macro.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/hygiene/pattern-macro.rs b/src/test/ui/hygiene/pattern-macro.rs
new file mode 100644
index 000000000..e5d6a3aa1
--- /dev/null
+++ b/src/test/ui/hygiene/pattern-macro.rs
@@ -0,0 +1,6 @@
+macro_rules! foo { () => ( x ) }
+
+fn main() {
+ let foo!() = 2;
+ x + 1; //~ ERROR cannot find value `x` in this scope
+}