summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro/derive-test.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/proc-macro/derive-test.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/derive-test.rs b/src/test/ui/proc-macro/derive-test.rs
new file mode 100644
index 000000000..b81e38432
--- /dev/null
+++ b/src/test/ui/proc-macro/derive-test.rs
@@ -0,0 +1,22 @@
+// run-pass
+// no-prefer-dynamic
+// compile-flags: --test
+
+#![crate_type = "proc-macro"]
+
+extern crate proc_macro;
+
+use proc_macro::TokenStream;
+
+// ```
+// assert!(true);
+// ```
+#[proc_macro_derive(Foo)]
+pub fn derive_foo(_input: TokenStream) -> TokenStream {
+ "".parse().unwrap()
+}
+
+#[test]
+pub fn test_derive() {
+ assert!(true);
+}