about summary refs log tree commit diff
path: root/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs')
-rw-r--r--tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs
new file mode 100644
index 00000000000..41f73f5963a
--- /dev/null
+++ b/tests/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs
@@ -0,0 +1,18 @@
+// force-host
+// no-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+
+#[proc_macro_derive(Foo)]
+pub fn foo(a: TokenStream) -> TokenStream {
+    "".parse().unwrap()
+}
+
+#[proc_macro_derive(Bar, attributes(custom))]
+pub fn bar(a: TokenStream) -> TokenStream {
+    "".parse().unwrap()
+}