]> git.lizzy.rs Git - rust.git/blob - src/test/ui/proc-macro/auxiliary/gen-lifetime-token.rs
normalize stderr
[rust.git] / src / test / ui / proc-macro / auxiliary / gen-lifetime-token.rs
1 // force-host
2 // no-prefer-dynamic
3
4 #![crate_type = "proc-macro"]
5
6 extern crate proc_macro;
7
8 use proc_macro::*;
9
10 #[proc_macro]
11 pub fn bar(_input: TokenStream) -> TokenStream {
12     let mut ret = Vec::<TokenTree>::new();
13     ret.push(Ident::new("static", Span::call_site()).into());
14     ret.push(Ident::new("FOO", Span::call_site()).into());
15     ret.push(Punct::new(':', Spacing::Alone).into());
16     ret.push(Punct::new('&', Spacing::Alone).into());
17     ret.push(Punct::new('\'', Spacing::Joint).into());
18     ret.push(Ident::new("static", Span::call_site()).into());
19     ret.push(Ident::new("i32", Span::call_site()).into());
20     ret.push(Punct::new('=', Spacing::Alone).into());
21     ret.push(Punct::new('&', Spacing::Alone).into());
22     ret.push(Literal::i32_unsuffixed(1).into());
23     ret.push(Punct::new(';', Spacing::Alone).into());
24     ret.into_iter().collect()
25 }