summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/auxiliary/amputate-span.rs
blob: 1a82119ae95e5239b1f2cff5e1786715be93a5b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// force-host
// no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;

use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn drop_first_token(attr: TokenStream, input: TokenStream) -> TokenStream {
    assert!(attr.is_empty());
    input.into_iter().skip(1).collect()
}