| /linux/rust/syn/ |
| H A D | custom_punctuation.rs | 81 ($ident:ident, $($tt:tt)+) => { 82 pub struct $ident { 89 pub fn $ident<__S: $crate::__private::IntoSpans<$crate::custom_punctuation_repr!($($tt)+)>>( 91 ) -> $ident { 93 $ident { 99 impl $crate::__private::Default for $ident { 101 $ident($crate::__private::Span::call_site()) 105 $crate::impl_parse_for_custom_punctuation!($ident, $($tt)+); 106 $crate::impl_to_tokens_for_custom_punctuation!($ident, $($tt)+); 107 $crate::impl_clone_for_custom_punctuation!($ident, $($tt)+); [all …]
|
| H A D | custom_keyword.rs | 93 ($ident:ident) => { 95 pub struct $ident { 102 pub fn $ident<__S: $crate::__private::IntoSpans<$crate::__private::Span>>( 104 ) -> $ident { 105 $ident { 111 impl $crate::__private::Default for $ident { 113 $ident { 119 $crate::impl_parse_for_custom_keyword!($ident); 120 $crate::impl_to_tokens_for_custom_keyword!($ident); 121 $crate::impl_clone_for_custom_keyword!($ident); [all …]
|
| H A D | macros.rs | 10 $pub:ident $struct:ident $name:ident #full $body:tt 33 $pub:ident $struct:ident $name:ident $body:tt 46 $pub:ident $enum:ident $name:ident $body:tt 58 $pub:ident $enum:ident $name:ident $body:tt 74 $name:ident { 78 $variant:ident $( ($member:ident) )*, 90 ($name:ident::Verbatim, $member:ident) => {}; 92 ($name:ident::$variant:ident, $member:ident) => { 104 ($($arms:tt)*) $tokens:ident $name:ident { 107 $variant:ident, [all …]
|
| H A D | lifetime.rs | 22 pub ident: Ident, field 52 if !crate::ident::xid_ok(&symbol[1..]) { in new() 58 ident: Ident::new(&symbol[1..], span), in new() 64 .join(self.ident.span()) in span() 70 self.ident.set_span(span); in set_span() 77 self.ident.fmt(formatter) in fmt() 85 ident: self.ident.clone(), in clone() 92 self.ident.eq(&other.ident) in eq() 106 self.ident.cmp(&other.ident) in cmp() 112 self.ident.hash(h); in hash() [all …]
|
| H A D | ident.rs | 18 ($token:ident) => { 61 fn accept_as_ident(ident: &Ident) -> bool { in accept_as_ident() 62 match ident.to_string().as_str() { in accept_as_ident() 81 if let Some((ident, rest)) = cursor.ident() { in parse() 82 if accept_as_ident(&ident) { in parse() 83 Ok((ident, rest)) in parse() 87 ident, in parse() 99 if let Some((ident, _rest)) = cursor.ident() { in peek() 100 accept_as_ident(&ident) in peek()
|
| H A D | data.rs | 5 use crate::ident::Ident; 18 pub ident: Ident, 196 pub ident: Option<Ident>, 214 let member = match &field.ident { in next() 215 Some(ident) => Member::Named(ident.clone()), in next() 248 use crate::ident::Ident; 264 let ident: Ident = input.parse()?; in parse() localVariable 294 ident, in parse() 331 let ident = if unnamed_field { in parse_named() localVariable 355 ident: Some(ident), in parse_named() [all …]
|
| H A D | path.rs | 7 use crate::ident::Ident; 65 pub fn is_ident<I>(&self, ident: &I) -> bool in is_ident() 71 Some(id) => id == ident, in is_ident() 89 Some(&self.segments[0].ident) in get_ident() 101 self.segments.first().unwrap().ident.span(), in require_ident() 102 self.segments.last().unwrap().ident.span(), in require_ident() 113 pub ident: Ident, 122 fn from(ident: T) -> Self { in from() 124 ident: ident.into(), in from() 215 pub ident: Ident, [all …]
|
| H A D | item.rs | 8 use crate::ident::Ident; 110 pub ident: Ident, 127 pub ident: Ident, 142 pub ident: Ident, 196 pub ident: Option<Ident>, 210 pub ident: Ident, 224 pub ident: Ident, 240 pub ident: Ident, 257 pub ident: Ident, 273 pub ident: Ident, [all …]
|
| H A D | derive.rs | 6 use crate::ident::Ident; 17 pub ident: Ident, 75 use crate::ident::Ident; 90 let ident = input.parse::<Ident>()?; in parse() localVariable 96 ident, in parse() 109 let ident = input.parse::<Ident>()?; in parse() localVariable 115 ident, in parse() 128 let ident = input.parse::<Ident>()?; in parse() localVariable 134 ident, in parse() 230 self.ident.to_tokens(tokens); in to_tokens()
|
| H A D | buffer.rs | 44 TokenTree::Ident(ident) => entries.push(Entry::Ident(ident)), in recursive_new() 191 pub fn ident(mut self) -> Option<(Ident, Cursor<'a>)> { in ident() method 194 Entry::Ident(ident) => Some((ident.clone(), unsafe { self.bump_ignore_group() })), in ident() 228 let (ident, rest) = next.ident()?; in lifetime() 231 ident, in lifetime() 310 Entry::Ident(ident) => (ident.clone().into(), 1), in token_tree() 325 Entry::Ident(ident) => ident.span(), in span()
|
| H A D | token.rs | 166 ($display:literal $($path:ident)::+ $get:ident) => { 204 ($($token:literal pub struct $name:ident)*) => { 306 ($name:ident/1) => { 322 ($name:ident/$len:literal) => {}; 326 ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => { 403 ($($token:literal pub struct $name:ident/$len:tt #[doc = $usage:literal])*) => { 445 ($($delim:ident pub struct $name:ident #[$doc:meta])*) => { 540 if let Some((ident, rest)) = cursor.ident() { in parse() 541 if ident == "_" { in parse() 542 return Ok((Underscore(ident.span()), rest)); in parse() [all …]
|
| H A D | meta.rs | 381 let start_span = self.path.segments[0].ident.span(); in error() 411 let ident = Ident::parse_any(input)?; in parse_meta_path() localVariable 412 segments.push_value(PathSegment::from(ident)); in parse_meta_path() 423 let ident = Ident::parse_any(input)?; in parse_meta_path() localVariable 424 segments.push_value(PathSegment::from(ident)); in parse_meta_path()
|
| /linux/rust/quote/ |
| H A D | lib.rs | 507 (# $var:ident) => {{ 656 ($span:expr=> # $var:ident) => {{ 689 ($call:ident! $extra:tt $($tts:tt)*) => { 700 ($call:ident! $extra:tt ($($b1:tt)*) ($($curr:tt)*)) => { 710 ($call:ident! $extra:tt $b1:tt ( $($inner:tt)* )) => { 714 ($call:ident! $extra:tt $b1:tt [ $($inner:tt)* ]) => { 718 ($call:ident! $extra:tt $b1:tt { $($inner:tt)* }) => { 722 ($call:ident!($($extra:tt)*) # $var:ident) => { 726 ($call:ident! $extra:tt $b1:tt $curr:tt) => {}; 732 ($has_iter:ident $var:ident) => { [all …]
|
| /linux/rust/zerocopy/src/util/ |
| H A D | macros.rs | 26 ($(#[$attr:meta])* $ty:ty: $trait:ident $(; |$candidate:ident| $is_bit_valid:expr)?) => {{ 54 ($(#[$attrs:meta])* $ty:ty: $($traits:ident),*) => { 58 (@impl_traits_with_packed_attrs $attrs:tt $ty:ty: $($traits:ident),*) => {{ 62 (@unpack_attrs { $(#[$attrs:meta])* } $ty:ty: $traits:ident) => { 93 const $constname:ident : $constty:ident $(,)? 94 $($tyvar:ident $(: $(? $optbound:ident $(+)?)* $($bound:ident $(+)?)* )?),* 95 => $trait:ident for $ty:ty $(; |$candidate:ident| $is_bit_valid:expr)? 107 $($tyvar:ident $(: $(? $optbound:ident $(+)?)* $($bound:ident $(+)?)* )?),* 108 => $trait:ident for $ty:ty $(; |$candidate:ident| $is_bit_valid:expr)? 120 $(@const $constname:ident : $constty:ident,)* [all …]
|
| /linux/rust/macros/ |
| H A D | quote.rs | |
| H A D | vtable.rs | 38 .any(|i| matches!(i, TraitItem::Type(t) if t.ident == "OwnerModule")) in vtable() 51 let name = &fn_item.sig.ident; in vtable() 82 defined_items.insert(const_item.ident.clone()); in vtable() 85 defined_items.insert(type_item.ident.clone()); in vtable() 106 let name = &fn_item.sig.ident;
|
| /linux/rust/pin-init/src/ |
| H A D | macros.rs | |
| /linux/rust/kernel/sync/atomic/ |
| H A D | internal.rs | 106 $func:ident($($arg:ident : $arg_type:ty),*) $(-> $ret:ty)? 115 $func:ident [$variant:ident $($rest:ident)*]($($arg_sig:tt)*) $(-> $ret:ty)? 131 $func:ident []($($arg_sig:tt)*) $(-> $ret:ty)? 144 ($ctype:ident) $func:ident($($arg:ident: $arg_type:ty),*) $(-> $ret:ty)? { 164 ($ctype:ident) [all...] |
| /linux/tools/net/sunrpc/xdrgen/ |
| H A D | xdr_ast.py | 587 ident = children[0] 589 return _XdrConstant(ident.symbol, value, line=ident.line, column=ident.column) 599 ident = body.children[i] 603 ident.symbol, value, line=ident.line, column=ident.column 617 ident = children[0] 621 ident.symbol, size, line=ident.line, column=ident.column 626 ident = children[0] 633 ident.symbol, maxsize, line=ident.line, column=ident.column 638 ident = children[0] 644 return _XdrString(ident.symbol, maxsize, line=ident.line, column=ident.column) [all …]
|
| /linux/rust/pin-init/internal/src/ |
| H A D | init.rs | 28 ident: Ident, field 39 ident: Ident, 43 ident: Ident, 55 fn ident(&self) -> Option<&Ident> { 57 Self::Value { ident, .. } | Self::Init { ident, .. } => Some(ident), 138 Some(This { ident, .. }) => quote! { 141 let #ident = unsafe { ::core::ptr::NonNull::new_unchecked(slot) }; 197 && segments[0].ident 493 let ident = input.parse()?; global() localVariable [all...] |
| /linux/rust/zerocopy/src/ |
| H A D | byteorder.rs | 169 ($name:ident, $native:ident) => { 181 ($name:ident, $native:ident, "floating point number") => { 193 ($name:ident, $native:ident, "unsigned integer") => { 196 ($name:ident, $native:ident, "signed integer") => { 199 ($name:ident, $native:ident, @all_types) => { 205 ($name:ident, $native:ident, $trait:ident) => { 216 ($name:ident, $native:ident, "floating point number") => { 220 ($name:ident, $native:ident, "unsigned integer") => { 223 ($name:ident, $native:ident, "signed integer") => { 226 ($name:ident, $native:ident, @all_types) => { [all …]
|
| /linux/rust/zerocopy-derive/derive/ |
| H A D | try_from_bytes.rs | 18 ident!(("___ZEROCOPY_TAG_{}", variant_ident), variant_ident.span()) in tag_ident() 34 let variant_ident = &v.ident; in generate_tag_consts() 64 ident!(("___ZerocopyVariantStruct_{}", variant_ident), variant_ident.span()) in variant_struct_ident() 81 let enum_name = &ctx.ast.ident; in generate_variant_structs() 98 let variant_struct_ident = variant_struct_ident(&variant.ident); in generate_variant_structs() 127 fn variants_union_field_ident(ident: &Ident) -> Ident { in variants_union_field_ident() 130 ident!(("__field_{}", ident), ident.span()) in variants_union_field_ident() 144 let field_name = variants_union_field_ident(&variant.ident); in generate_variants_union() 145 let variant_struct_ident = variant_struct_ident(&variant.ident); in generate_variants_union() 230 let variant_ident = &variant.unwrap().ident; in derive_is_bit_valid() [all …]
|
| H A D | known_layout.rs | 126 let ident = &ctx.ast.ident; in derive_known_layout_for_repr_c_struct() localVariable 139 let field_index = |name: &TokenStream| ident!(("__Zerocopy_Field_{}", name), ident.span()); in derive_known_layout_for_repr_c_struct() 161 … unsafe impl #impl_generics #zerocopy_crate::util::macro_util::Field<#idx> for #ident #ty_generics in derive_known_layout_for_repr_c_struct() 178 <#ident #ty_generics as in derive_known_layout_for_repr_c_struct() 205 <#ident #ty_generics as in derive_known_layout_for_repr_c_struct() 236 … type PointerMetadata = <#ident #ty_generics as #zerocopy_crate::KnownLayout>::PointerMetadata; in derive_known_layout_for_repr_c_struct() 240 …const LAYOUT: #zerocopy_crate::DstLayout = <#ident #ty_generics as #zerocopy_crate::KnownLayout>::… in derive_known_layout_for_repr_c_struct()
|
| /linux/rust/kernel/ |
| H A D | init.rs | |
| /linux/rust/ |
| H A D | compiler_builtins.rs | 29 ($reason: tt, { $($ident: ident, )* }) => { 32 #[export_name = concat!("__rust", stringify!($ident))] 33 pub extern "C" fn $ident() {
|