about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-14 20:45:23 +0000
committerbors <bors@rust-lang.org>2021-04-14 20:45:23 +0000
commit16bf626a31cb5b121d0bca2baa969b4f67eb0dab (patch)
tree977714bcfe9e7976656fddb84ca5a9ef7efd0b08 /src
parent7537b20626100e7e7fc8c4ad3079d38c05338121 (diff)
parentc6d67f83170adf586abc93adedc8048e325611e1 (diff)
downloadrust-16bf626a31cb5b121d0bca2baa969b4f67eb0dab.tar.gz
rust-16bf626a31cb5b121d0bca2baa969b4f67eb0dab.zip
Auto merge of #84130 - Aaron1011:fix/none-delim-lookahead, r=petrochenkov
Fix lookahead with None-delimited group

Fixes https://github.com/rust-lang/rust/issues/84162, a regression introduced by https://github.com/rust-lang/rust/pull/82608.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/macros/none-delim-lookahead.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/macros/none-delim-lookahead.rs b/src/test/ui/macros/none-delim-lookahead.rs
new file mode 100644
index 00000000000..bf4fddea14b
--- /dev/null
+++ b/src/test/ui/macros/none-delim-lookahead.rs
@@ -0,0 +1,15 @@
+// check-pass
+
+macro_rules! make_struct {
+    ($name:ident) => {
+        #[derive(Debug)]
+        struct Foo {
+            #[cfg(not(FALSE))]
+            field: fn($name: bool)
+        }
+    }
+}
+
+make_struct!(param_name);
+
+fn main() {}