summary refs log tree commit diff
path: root/tests/ui/proc-macro/helper-attr-builtin-derive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/proc-macro/helper-attr-builtin-derive.rs')
-rw-r--r--tests/ui/proc-macro/helper-attr-builtin-derive.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/helper-attr-builtin-derive.rs b/tests/ui/proc-macro/helper-attr-builtin-derive.rs
new file mode 100644
index 00000000000..eb7292e093c
--- /dev/null
+++ b/tests/ui/proc-macro/helper-attr-builtin-derive.rs
@@ -0,0 +1,19 @@
+// This test checks that helper attributes of a derive proc macro can be used together with
+// other built-in derive macros.
+// issue: rust-lang/rust#132561
+//@ check-pass
+//@ aux-build:helper-attr.rs
+//@ edition:2021
+
+#[macro_use]
+extern crate helper_attr;
+
+use helper_attr::WithHelperAttr;
+
+#[derive(WithHelperAttr, Debug, Clone, PartialEq)]
+struct MyStruct<#[x] 'a, #[x] const A: usize, #[x] B> {
+    #[x]
+    field: &'a [B; A],
+}
+
+fn main() {}