about summary refs log tree commit diff
path: root/tests/ui/hygiene/pattern-macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/hygiene/pattern-macro.rs')
-rw-r--r--tests/ui/hygiene/pattern-macro.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/hygiene/pattern-macro.rs b/tests/ui/hygiene/pattern-macro.rs
new file mode 100644
index 00000000000..e5d6a3aa1a0
--- /dev/null
+++ b/tests/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
+}