rust/tests/ui/underscore-imports/auxiliary/duplicate.rs
2024-02-16 20:02:50 +00:00

15 lines
299 B
Rust

//@ 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()
}