diff options
Diffstat (limited to 'tests/ui/underscore-imports/auxiliary/duplicate.rs')
-rw-r--r-- | tests/ui/underscore-imports/auxiliary/duplicate.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/underscore-imports/auxiliary/duplicate.rs b/tests/ui/underscore-imports/auxiliary/duplicate.rs new file mode 100644 index 000000000..92d741b6a --- /dev/null +++ b/tests/ui/underscore-imports/auxiliary/duplicate.rs @@ -0,0 +1,14 @@ +// force-host +// no-prefer-dynamic + +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +use proc_macro::*; + +#[proc_macro_attribute] +pub fn duplicate(_: TokenStream, input: TokenStream) -> TokenStream { + let clone = input.clone(); + input.into_iter().chain(clone.into_iter()).collect() +} |