Home
last modified time | relevance | path

Searched refs:Ident (Results 1 - 25 of 233) sorted by relevance

12345678910

/third_party/rust/crates/syn/src/
H A Dident.rs4 pub use proc_macro2::Ident;
10 pub fn Ident(marker: lookahead::TokenMarker) -> Ident { in Ident() functions
17 impl From<Token![$token]> for Ident {
18 fn from(token: Token![$token]) -> Ident { in from()
19 Ident::new(stringify!($token), token.span) in from()
31 impl From<Token![_]> for Ident {
32 fn from(token: Token![_]) -> Ident { in from()
33 Ident::new("_", token.span) in from()
56 use proc_macro2::Ident;
[all...]
H A Dext.rs8 use proc_macro2::Ident;
10 /// Additional methods for `Ident` not provided by proc-macro2 or libproc_macro.
13 /// is implemented only for `proc_macro2::Ident`.
23 /// use syn::{Error, Ident, Result, Token};
38 /// fn parse_dsl(input: ParseStream) -> Result<Ident> {
41 /// let name = input.call(Ident::parse_any)?;
48 /// `input.peek(Ident::peek_any)`
50 /// This is different from `input.peek(Ident)` which only returns true in
74 /// use syn::Ident;
77 /// fn ident_for_getter(variable: &Ident)
[all...]
H A Dbuffer.rs10 use proc_macro2::{Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree};
20 Ident(Ident),
40 TokenTree::Ident(ident) => entries.push(Entry::Ident(ident)), in recursive_new()
107 // (`Ident` is a reference into a thread-local table). This is because in empty()
108 // this entry never includes a `Ident` object. in empty()
228 /// If the cursor is pointing at a `Ident`, returns it along with a cursor
230 pub fn ident(mut self) -> Option<(Ident, Cursor<'a>)> { in ident()
233 Entry::Ident(iden
[all...]
/third_party/rust/crates/proc-macro2/src/
H A Dwrapper.rs171 TokenTree::Ident(tt) => tt.inner.unwrap_nightly().into(), in into_compiler_token()
346 proc_macro::TokenTree::Ident(s) => crate::Ident::_new(Ident::Compiler(s)).into(), in next()
652 pub(crate) enum Ident {
653 Compiler(proc_macro::Ident),
654 Fallback(fallback::Ident),
657 impl Ident { impls
661 Span::Compiler(s) => Ident::Compiler(proc_macro::Ident in new_checked()
[all...]
H A Dlib.rs552 Ident(Ident),
565 TokenTree::Ident(t) => t.span(), in span()
579 TokenTree::Ident(t) => t.set_span(span), in set_span()
592 impl From<Ident> for TokenTree {
593 fn from(g: Ident) -> Self { in from()
594 TokenTree::Ident(g) in from()
618 TokenTree::Ident(t) => Display::fmt(t, f), in fmt()
632 TokenTree::Ident(t) => { in fmt()
633 let mut debug = f.debug_struct("Ident"); in fmt()
920 pub struct Ident { global() structure names
925 impl Ident { global() impls
[all...]
/third_party/rust/crates/syn/tests/
H A Dtest_item.rs6 use proc_macro2::{Delimiter, Group, Ident, Span, TokenStream, TokenTree};
15 TokenTree::Ident(Ident::new("fn", Span::call_site())), in test_macro_variable_attr()
16 TokenTree::Ident(Ident::new("f", Span::call_site())), in test_macro_variable_attr()
125 TokenTree::Ident(Ident::new("impl", Span::call_site())), in test_macro_variable_impl()
127 TokenTree::Ident(Ident::new("for", Span::call_site())), in test_macro_variable_impl()
H A Dtest_ty.rs6 use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
27 TokenTree::Ident(Ident::new("T", Span::call_site())), in test_macro_variable_type()
62 TokenTree::Ident(Ident::new("T", Span::call_site())), in test_macro_variable_type()
97 TokenTree::Ident(Ident::new("Option", Span::call_site())), in test_group_angle_brackets()
151 TokenTree::Ident(Ident::new("Item", Span::call_site())), in test_group_colons()
187 TokenTree::Ident(Iden in test_group_colons()
[all...]
H A Dtest_visibility.rs6 use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};
106 TokenTree::Ident(Ident::new("struct", Span::call_site())), in test_empty_group_vis()
107 TokenTree::Ident(Ident::new("S", Span::call_site())), in test_empty_group_vis()
114 TokenStream::from_iter(vec![TokenTree::Ident(Ident::new( in test_empty_group_vis()
H A Dtest_stmt.rs10 use proc_macro2::{Delimiter, Group, Ident, Span, TokenStream, TokenTree};
64 TokenTree::Ident(Ident::new("async", Span::call_site())), in test_none_group()
65 TokenTree::Ident(Ident::new("fn", Span::call_site())), in test_none_group()
66 TokenTree::Ident(Ident::new("f", Span::call_site())), in test_none_group()
93 pat: Pat::Ident { in test_none_group()
148 Pat::Ident { in test_let_else()
H A Dtest_ident.rs1 use proc_macro2::{Ident, Span, TokenStream};
5 fn parse(s: &str) -> Result<Ident> { in parse()
9 fn new(s: &str) -> Ident { in new()
10 Ident::new(s, Span::call_site()) in new()
59 #[should_panic(expected = "use Option<Ident>")]
65 #[should_panic(expected = "not a valid Ident")]
82 #[should_panic(expected = "\"a#\" is not a valid Ident")]
/third_party/rust/crates/clap/clap_derive/src/
H A Ddummies.rs3 use proc_macro2::Ident;
7 pub fn parser(name: &Ident) -> proc_macro2::TokenStream { in parser()
16 pub fn into_app(name: &Ident) -> proc_macro2::TokenStream { in into_app()
30 pub fn from_arg_matches(name: &Ident) -> proc_macro2::TokenStream { in from_arg_matches()
44 pub fn subcommand(name: &Ident) -> proc_macro2::TokenStream { in subcommand()
63 pub fn args(name: &Ident) -> proc_macro2::TokenStream { in args()
79 pub fn value_enum(name: &Ident) -> proc_macro2::TokenStream { in value_enum()
/third_party/rust/crates/proc-macro2/tests/
H A Dtest.rs8 use proc_macro2::{Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree};
15 Ident::new("String", Span::call_site()).to_string(), in idents()
18 assert_eq!(Ident::new("fn", Span::call_site()).to_string(), "fn"); in idents()
19 assert_eq!(Ident::new("_", Span::call_site()).to_string(), "_"); in idents()
25 Ident::new_raw("String", Span::call_site()).to_string(), in raw_idents()
28 assert_eq!(Ident::new_raw("fn", Span::call_site()).to_string(), "r#fn"); in raw_idents()
34 Ident::new_raw("_", Span::call_site()); in ident_raw_underscore()
40 Ident::new_raw("super", Span::call_site()); in ident_raw_reserved()
44 #[should_panic(expected = "Ident is not allowed to be empty; use Option<Ident>")]
[all...]
/third_party/rust/crates/clap/clap_derive/src/derives/
H A Dvalue_enum.rs14 use syn::{spanned::Spanned, Data, DeriveInput, Fields, Ident, Variant};
39 item_name: &Ident, in gen_for_enum()
74 fn lits(variants: &[(&Variant, Item)]) -> Result<Vec<(TokenStream, Ident)>, syn::Error> { in lits()
98 fn gen_value_variants(lits: &[(TokenStream, Ident)]) -> TokenStream { in gen_value_variants()
108 fn gen_to_possible_value(item: &Item, lits: &[(TokenStream, Ident)]) -> TokenStream { in gen_to_possible_value()
109 let (lit, variant): (Vec<TokenStream>, Vec<Ident>) = lits.iter().cloned().unzip(); in gen_to_possible_value()
H A Dinto_app.rs17 use syn::{Generics, Ident};
23 item_name: &Ident, in gen_for_struct()
29 let app_var = Ident::new("__clap_app", Span::call_site()); in gen_for_struct()
63 item_name: &Ident, in gen_for_enum()
69 let app_var = Ident::new("__clap_app", Span::call_site()); in gen_for_enum()
/third_party/rust/crates/cxx/gen/build/src/syntax/
H A Dqualified.rs3 use syn::{Ident, LitStr, Token};
6 pub segments: Vec<Ident>,
41 while trailing_punct && input.peek(Ident::peek_any) { in parse_unquoted()
42 let mut ident = Ident::parse_any(input)?; in parse_unquoted()
51 ident = Ident::new(unraw, ident.span()); in parse_unquoted()
H A Dtrivial.rs4 use proc_macro2::Ident;
21 structs: &UnorderedMap<&'a Ident, &'a Struct>, in required_trivial_reasons()
22 enums: &UnorderedMap<&'a Ident, &'a Enum>, in required_trivial_reasons()
23 cxx: &UnorderedSet<&'a Ident>, in required_trivial_reasons()
24 ) -> UnorderedMap<&'a Ident, Vec<TrivialReason<'a>>> { in required_trivial_reasons()
43 if let Type::Ident(ident) = &field.ty {
58 Type::Ident(ident) => {
64 if let Type::Ident(ident) = &ty.inner {
75 Type::Ident(ident) => {
81 if let Type::Ident(iden
[all...]
/third_party/rust/crates/cxx/gen/cmd/src/syntax/
H A Dqualified.rs3 use syn::{Ident, LitStr, Token};
6 pub segments: Vec<Ident>,
41 while trailing_punct && input.peek(Ident::peek_any) { in parse_unquoted()
42 let mut ident = Ident::parse_any(input)?; in parse_unquoted()
51 ident = Ident::new(unraw, ident.span()); in parse_unquoted()
H A Dtrivial.rs4 use proc_macro2::Ident;
21 structs: &UnorderedMap<&'a Ident, &'a Struct>, in required_trivial_reasons()
22 enums: &UnorderedMap<&'a Ident, &'a Enum>, in required_trivial_reasons()
23 cxx: &UnorderedSet<&'a Ident>, in required_trivial_reasons()
24 ) -> UnorderedMap<&'a Ident, Vec<TrivialReason<'a>>> { in required_trivial_reasons()
43 if let Type::Ident(ident) = &field.ty {
58 Type::Ident(ident) => {
64 if let Type::Ident(ident) = &ty.inner {
75 Type::Ident(ident) => {
81 if let Type::Ident(iden
[all...]
/third_party/rust/crates/cxx/macro/src/syntax/
H A Dqualified.rs3 use syn::{Ident, LitStr, Token};
6 pub segments: Vec<Ident>,
41 while trailing_punct && input.peek(Ident::peek_any) { in parse_unquoted()
42 let mut ident = Ident::parse_any(input)?; in parse_unquoted()
51 ident = Ident::new(unraw, ident.span()); in parse_unquoted()
H A Dtrivial.rs4 use proc_macro2::Ident;
21 structs: &UnorderedMap<&'a Ident, &'a Struct>, in required_trivial_reasons()
22 enums: &UnorderedMap<&'a Ident, &'a Enum>, in required_trivial_reasons()
23 cxx: &UnorderedSet<&'a Ident>, in required_trivial_reasons()
24 ) -> UnorderedMap<&'a Ident, Vec<TrivialReason<'a>>> { in required_trivial_reasons()
43 if let Type::Ident(ident) = &field.ty {
58 Type::Ident(ident) => {
64 if let Type::Ident(ident) = &ty.inner {
75 Type::Ident(ident) => {
81 if let Type::Ident(iden
[all...]
/third_party/rust/crates/cxx/gen/lib/src/syntax/
H A Dqualified.rs3 use syn::{Ident, LitStr, Token};
6 pub segments: Vec<Ident>,
41 while trailing_punct && input.peek(Ident::peek_any) { in parse_unquoted()
42 let mut ident = Ident::parse_any(input)?; in parse_unquoted()
51 ident = Ident::new(unraw, ident.span()); in parse_unquoted()
H A Dtrivial.rs4 use proc_macro2::Ident;
21 structs: &UnorderedMap<&'a Ident, &'a Struct>, in required_trivial_reasons()
22 enums: &UnorderedMap<&'a Ident, &'a Enum>, in required_trivial_reasons()
23 cxx: &UnorderedSet<&'a Ident>, in required_trivial_reasons()
24 ) -> UnorderedMap<&'a Ident, Vec<TrivialReason<'a>>> { in required_trivial_reasons()
43 if let Type::Ident(ident) = &field.ty {
58 Type::Ident(ident) => {
64 if let Type::Ident(ident) = &ty.inner {
75 Type::Ident(ident) => {
81 if let Type::Ident(iden
[all...]
/third_party/rust/crates/cxx/syntax/
H A Dqualified.rs3 use syn::{Ident, LitStr, Token};
6 pub segments: Vec<Ident>,
41 while trailing_punct && input.peek(Ident::peek_any) { in parse_unquoted()
42 let mut ident = Ident::parse_any(input)?; in parse_unquoted()
51 ident = Ident::new(unraw, ident.span()); in parse_unquoted()
H A Dtrivial.rs4 use proc_macro2::Ident;
21 structs: &UnorderedMap<&'a Ident, &'a Struct>, in required_trivial_reasons()
22 enums: &UnorderedMap<&'a Ident, &'a Enum>, in required_trivial_reasons()
23 cxx: &UnorderedSet<&'a Ident>, in required_trivial_reasons()
24 ) -> UnorderedMap<&'a Ident, Vec<TrivialReason<'a>>> { in required_trivial_reasons()
43 if let Type::Ident(ident) = &field.ty {
58 Type::Ident(ident) => {
64 if let Type::Ident(ident) = &ty.inner {
75 Type::Ident(ident) => {
81 if let Type::Ident(iden
[all...]
/third_party/rust/crates/syn/codegen/src/
H A Dsnapshot.rs4 use proc_macro2::{Ident, Span, TokenStream};
14 let ident = Ident::new(ty, Span::call_site()); in rust_type()
18 let ident = Ident::new(ty, Span::call_site()); in rust_type()
22 let ident = Ident::new(ty, Span::call_site()); in rust_type()
26 let ident = Ident::new(ty, Span::call_site()); in rust_type()
31 let punct = Ident::new(&ty.punct, Span::call_site()); in rust_type()
147 let ident = Ident::new(&node.ident, Span::call_site()); in expand_impl_body()
154 let variant = Ident::new(v, Span::call_site()); in expand_impl_body()
230 let ident = Ident::new(f, Span::call_site()); in expand_impl_body()
318 let ident = Ident in expand_impl()
[all...]

Completed in 10 milliseconds

12345678910