Lines Matching refs:TokenTree
4 use proc_macro::{Group, Punct, Spacing, TokenStream, TokenTree};
27 .skip_while(|tt| !matches!(tt, TokenTree::Ident(i) if i.to_string() == "struct")) in pin_data()
30 TokenTree::Ident(_) => { in pin_data()
36 res.push(TokenTree::Punct(Punct::new(':', Spacing::Joint))); in pin_data()
37 res.push(TokenTree::Punct(Punct::new(':', Spacing::Alone))); in pin_data()
38 res.push(TokenTree::Punct(Punct::new('<', Spacing::Alone))); in pin_data()
40 res.push(TokenTree::Punct(Punct::new('>', Spacing::Alone))); in pin_data()
64 if matches!(&tt, TokenTree::Ident(i) if i.to_string() == "struct") { in pin_data()
90 struct_name: &Vec<TokenTree>, in replace_self_and_deny_type_defs() argument
91 tt: TokenTree, in replace_self_and_deny_type_defs() argument
93 ) -> Vec<TokenTree> { in replace_self_and_deny_type_defs() argument
95 TokenTree::Ident(ref i) in replace_self_and_deny_type_defs()
117 TokenTree::Ident(i) if i.to_string() == "Self" => struct_name.clone(), in replace_self_and_deny_type_defs()
118 TokenTree::Literal(_) | TokenTree::Punct(_) | TokenTree::Ident(_) => vec![tt], in replace_self_and_deny_type_defs()
119 TokenTree::Group(g) => vec![TokenTree::Group(Group::new( in replace_self_and_deny_type_defs()