Home
last modified time | relevance | path

Searched refs:Ident (Results 1 – 10 of 10) sorted by relevance

/rust/macros/
A Dconcat_idents.rs3 use proc_macro::{token_stream, Ident, TokenStream, TokenTree};
7 fn expect_ident(it: &mut token_stream::IntoIter) -> Ident { in expect_ident() argument
8 if let Some(TokenTree::Ident(ident)) = it.next() { in expect_ident()
21 let res = Ident::new(&format!("{a}{b}"), b.span()); in concat_idents()
22 TokenStream::from_iter([TokenTree::Ident(res)]) in concat_idents()
A Dvtable.rs14 TokenTree::Ident(ident) => match ident.to_string().as_str() { in vtable()
34 TokenTree::Ident(ident) if ident.to_string() == "fn" => { in vtable()
36 Some(TokenTree::Ident(ident)) => ident.to_string(), in vtable()
42 TokenTree::Ident(ident) if ident.to_string() == "const" => { in vtable()
44 Some(TokenTree::Ident(ident)) => ident.to_string(), in vtable()
A Dhelpers.rs3 use proc_macro::{token_stream, Group, Ident, TokenStream, TokenTree};
6 if let Some(TokenTree::Ident(ident)) = it.next() { in try_ident()
74 pub(crate) fn function_name(input: TokenStream) -> Option<Ident> { in function_name() argument
78 TokenTree::Ident(i) if i.to_string() == "fn" => { in function_name()
79 if let Some(TokenTree::Ident(i)) = input.next() { in function_name()
A Dpaste.rs3 use proc_macro::{Delimiter, Group, Ident, Spacing, Span, TokenTree};
21 Some(TokenTree::Ident(ident)) => { in concat_helper()
29 let Some(TokenTree::Ident(ident)) = tokens.next() else { in concat_helper()
63 TokenTree::Ident(Ident::new(&pasted, group_span)) in concat()
A Dkunit.rs27 TokenTree::Ident(ident) => match ident.to_string().as_str() { in kunit_tests()
47 Some(TokenTree::Ident(ident)) if ident.to_string() == "fn" => { in kunit_tests()
49 Some(TokenTree::Ident(ident)) => ident.to_string(), in kunit_tests()
A Dquote.rs24 impl ToTokens for proc_macro::Ident { implementation
160 $v.push(::proc_macro::TokenTree::Ident(::proc_macro::Ident::new("_", $span)));
164 $v.push(::proc_macro::TokenTree::Ident(::proc_macro::Ident::new(stringify!($id), $span)));
A Dmodule.rs121 Some(TokenTree::Ident(ident)) => ident.to_string(), in parse()
/rust/pin-init/internal/src/
A Dpin_data.rs31 .skip_while(|tt| !matches!(tt, TokenTree::Ident(i) if i.to_string() == "struct")) in pin_data()
34 TokenTree::Ident(_) => { in pin_data()
68 if matches!(&tt, TokenTree::Ident(i) if i.to_string() == "struct") { in pin_data()
100 TokenTree::Ident(ref i) in replace_self_and_deny_type_defs()
122 TokenTree::Ident(i) if i.to_string() == "Self" => struct_name.clone(), in replace_self_and_deny_type_defs()
123 TokenTree::Literal(_) | TokenTree::Punct(_) | TokenTree::Ident(_) => vec![tt], in replace_self_and_deny_type_defs()
A Dpinned_drop.rs12 assert!(matches!(&toks[0], TokenTree::Ident(i) if i.to_string() == "impl")); in pinned_drop()
30 matches!(tt, TokenTree::Ident(i) if i.to_string() == "PinnedDrop"), in pinned_drop()
A Dhelpers.rs104 TokenTree::Ident(i) if at_start && i.to_string() == "const" => { in parse_generics()
115 TokenTree::Ident(_) if at_start => { in parse_generics()

Completed in 12 milliseconds