Lines Matching refs:TokenTree
4 use proc_macro::{Group, Punct, Spacing, TokenStream, TokenTree};
28 .skip_while(|tt| !matches!(tt, TokenTree::Ident(i) if i.to_string() == "struct")) in pin_data()
31 TokenTree::Ident(_) => { in pin_data()
37 res.push(TokenTree::Punct(Punct::new(':', Spacing::Joint))); in pin_data()
38 res.push(TokenTree::Punct(Punct::new(':', Spacing::Alone))); in pin_data()
39 res.push(TokenTree::Punct(Punct::new('<', Spacing::Alone))); in pin_data()
41 res.push(TokenTree::Punct(Punct::new('>', Spacing::Alone))); in pin_data()
65 if matches!(&tt, TokenTree::Ident(i) if i.to_string() == "struct") { in pin_data()
92 struct_name: &Vec<TokenTree>, in replace_self_and_deny_type_defs() argument
93 tt: TokenTree, in replace_self_and_deny_type_defs() argument
95 ) -> Vec<TokenTree> { in replace_self_and_deny_type_defs() argument
97 TokenTree::Ident(ref i) in replace_self_and_deny_type_defs()
119 TokenTree::Ident(i) if i.to_string() == "Self" => struct_name.clone(), in replace_self_and_deny_type_defs()
120 TokenTree::Literal(_) | TokenTree::Punct(_) | TokenTree::Ident(_) => vec![tt], in replace_self_and_deny_type_defs()
121 TokenTree::Group(g) => vec![TokenTree::Group(Group::new( in replace_self_and_deny_type_defs()