diff options
Diffstat (limited to 'tests/run-make/rustc-macro-dep-files/foo.rs')
-rw-r--r-- | tests/run-make/rustc-macro-dep-files/foo.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run-make/rustc-macro-dep-files/foo.rs b/tests/run-make/rustc-macro-dep-files/foo.rs new file mode 100644 index 000000000..66db1a217 --- /dev/null +++ b/tests/run-make/rustc-macro-dep-files/foo.rs @@ -0,0 +1,12 @@ +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +use proc_macro::TokenStream; + +#[proc_macro_derive(A)] +pub fn derive(input: TokenStream) -> TokenStream { + let input = input.to_string(); + assert!(input.contains("struct A ;")); + "struct B;".parse().unwrap() +} |