about summary refs log tree commit diff
path: root/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/proc-macro/auxiliary/derive-unstable-2.rs')
-rw-r--r--tests/ui/proc-macro/auxiliary/derive-unstable-2.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs b/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs
new file mode 100644
index 00000000000..eac21b04983
--- /dev/null
+++ b/tests/ui/proc-macro/auxiliary/derive-unstable-2.rs
@@ -0,0 +1,17 @@
+// force-host
+// no-prefer-dynamic
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+
+#[proc_macro_derive(Unstable)]
+pub fn derive(_input: TokenStream) -> TokenStream {
+
+    "
+        #[rustc_foo]
+        fn foo() {}
+    ".parse().unwrap()
+}