diff options
Diffstat (limited to 'src/test/rustdoc/rustc-macro-crate.rs')
-rw-r--r-- | src/test/rustdoc/rustc-macro-crate.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/rustdoc/rustc-macro-crate.rs b/src/test/rustdoc/rustc-macro-crate.rs new file mode 100644 index 000000000..dd5edc984 --- /dev/null +++ b/src/test/rustdoc/rustc-macro-crate.rs @@ -0,0 +1,14 @@ +// force-host +// no-prefer-dynamic +// compile-flags: --crate-type proc-macro + +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +use proc_macro::TokenStream; + +#[proc_macro_derive(Foo)] +pub fn foo(input: TokenStream) -> TokenStream { + input +} |