]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/crashes/ice-3747.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / crashes / ice-3747.rs
diff --git a/src/tools/clippy/tests/ui/crashes/ice-3747.rs b/src/tools/clippy/tests/ui/crashes/ice-3747.rs
new file mode 100644 (file)
index 0000000..cdf018c
--- /dev/null
@@ -0,0 +1,17 @@
+/// Test for https://github.com/rust-lang/rust-clippy/issues/3747
+
+macro_rules! a {
+    ( $pub:tt $($attr:tt)* ) => {
+        $($attr)* $pub fn say_hello() {}
+    };
+}
+
+macro_rules! b {
+    () => {
+        a! { pub }
+    };
+}
+
+b! {}
+
+fn main() {}