| /linux/rust/kernel/ |
| H A D | bits.rs | 13 $ty:ty 21 pub fn [<checked_bit_ $ty>](n: u32) -> Option<$ty> { 22 (1 as $ty).checked_shl(n) 32 pub const fn [<bit_ $ty>](n: u32) -> $ty { 33 build_assert!(n < <$ty>::BITS); 34 (1 as $ty) << n 47 $ty:ty, 60 pub fn [<genmask_checked_ $ty>](range: RangeInclusive<u32>) -> Option<$ty> { 68 let high = [<checked_bit_ $ty>](end)?; 69 let low = [<checked_bit_ $ty>](start)?; [all …]
|
| H A D | init.rs | |
| H A D | module_param.rs | 88 ($ty:ident) => { 89 impl ModuleParam for $ty { 91 <$ty as crate::str::parse_int::ParseInt>::from_str(arg) 183 ($ops:ident, $ty:ty) => { 187 set: Some(set_param::<$ty>),
|
| H A D | configfs.rs | 743 ($tpe:ty) => { 889 container: $container:ty, 890 data: $data:ty, 908 container: $container:ty, 909 data: $data:ty, 910 child: $child:ty, 928 @container($container:ty), 929 @data($data:ty), 930 @child($($child:ty)?), 965 @container($container:ty), [all...] |
| H A D | bitfield.rs | 295 $(#[$attr:meta])* $vis:vis struct $name:ident($storage:ty) { $($fields:tt)* } 307 (@core $(#[$attr:meta])* $vis:vis $name:ident $storage:ty) => { 353 (@fields $vis:vis $name:ident $storage:ty { 355 $(?=> $try_into_type:ty)? 356 $(=> $into_type:ty)? 378 @private_field_accessors $vis:vis $name:ident $storage:ty : $hi:tt:$lo:tt $field:ident 423 @public_field_accessors $(#[doc = $doc:expr])* $vis:vis $name:ident $storage:ty : 424 $hi:literal:$lo:literal $field:ident => $into_type:ty 449 @public_field_accessors $(#[doc = $doc:expr])* $vis:vis $name:ident $storage:ty : 450 $hi:tt:$lo:tt $field:ident ?=> $try_into_type:ty [all …]
|
| H A D | jump_label.rs | 22 ($key:path, $keytyp:ty, $field:ident) => {{ 50 ($key:path, $keytyp:ty, $field:ident, $branch:expr) => {'my_label: { 70 ($key:path, $keytyp:ty, $field:ident, $branch:expr) => {
|
| H A D | fmt.rs | 181 $( { $($generics:tt)* } )? $ty:ty $( { where $($where:tt)* } )? 184 impl$($($generics)*)? Display for $ty $(where $($where)*)? {
|
| /linux/rust/zerocopy/src/util/ |
| H A D | macros.rs | 26 ($(#[$attr:meta])* $ty:ty: $trait:ident $(; |$candidate:ident| $is_bit_valid:expr)?) => {{ 31 unsafe impl $trait for $ty { 54 ($(#[$attrs:meta])* $ty:ty: $($traits:ident),*) => { 55 unsafe_impl!(@impl_traits_with_packed_attrs { $(#[$attrs])* } $ty: $($traits),*) 58 (@impl_traits_with_packed_attrs $attrs:tt $ty:ty: $($traits:ident),*) => {{ 59 $( unsafe_impl!(@unpack_attrs $attrs $ty: $traits); )* 62 (@unpack_attrs { $(#[$attrs:meta])* } $ty:ty: $traits:ident) => { 63 unsafe_impl!($(#[$attrs])* $ty: $traits); 95 => $trait:ident for $ty:ty $(; |$candidate:ident| $is_bit_valid:expr)? 102 => $trait for $ty $(; |$candidate| $is_bit_valid)? [all …]
|
| H A D | macro_util.rs | 137 ($ty:ty, $trailing_field_name:tt) => {{ 161 zero_elems as *const $ty, 169 let ptr = ALIGNED_64K_ALLOCATION.as_ptr() as *const $ty; 235 ($ty:ty) => {{ 259 _trailing: $ty, 334 ($t:ty, $_align:expr, $_packed:expr, [$($ts:ty),*]) => {{ 350 ($t:ty, $align:expr, $packed:expr, [$($ts:tt),*]) => {{ 358 (@field ([$t:ty])) => { 361 (@field ($t:ty)) => { 364 (@field [$t:ty]) => { [all …]
|
| /linux/drivers/media/radio/ |
| H A D | radio-typhoon.c | 78 struct typhoon *ty = kzalloc_obj(*ty); in typhoon_alloc() local 80 return ty ? &ty->isa : NULL; in typhoon_alloc() 113 struct typhoon *ty = container_of(isa, struct typhoon, isa); in typhoon_s_mute_volume() local 122 if (vol == 0 && !ty->muted) { in typhoon_s_mute_volume() 123 ty->muted = true; in typhoon_s_mute_volume() 126 if (vol && ty->muted) { in typhoon_s_mute_volume() 127 ty->muted = false; in typhoon_s_mute_volume()
|
| /linux/rust/kernel/str/ |
| H A D | parse_int.rs | 106 ($($ty:ty),*) => { 108 impl private::FromStrRadix for $ty { 110 <$ty>::from_str_radix(core::str::from_utf8(src).map_err(|_| EINVAL)?, radix) 117 if <$ty>::MIN < 0 { 118 1u64 << (<$ty>::BITS - 1) 129 return Ok(<$ty>::MIN); 143 impl ParseInt for $ty {}
|
| /linux/rust/syn/ |
| H A D | classify.rs | 12 use crate::ty::{ReturnType, Type}; 73 pub(crate) fn trailing_unparameterized_path(mut ty: &Type) -> bool { in trailing_unparameterized_path() 75 match ty { in trailing_unparameterized_path() 78 ReturnType::Type(_, ret) => ty = ret, in trailing_unparameterized_path() 82 ControlFlow::Continue(t) => ty = t, in trailing_unparameterized_path() 86 ControlFlow::Continue(t) => ty = t, in trailing_unparameterized_path() 88 Type::Ptr(t) => ty = &t.elem, in trailing_unparameterized_path() 89 Type::Reference(t) => ty = &t.elem, in trailing_unparameterized_path() 92 ControlFlow::Continue(t) => ty = t, in trailing_unparameterized_path() 207 Expr::Cast(e) => return type_trailing_brace(&e.ty), in expr_trailing_brace() [all …]
|
| H A D | item.rs | 17 use crate::ty::{Abi, ReturnType, Type}; 113 pub ty: Box<Type>, 226 pub ty: Box<Type>, 291 pub ty: Box<Type>, 565 pub ty: Box<Type>, 648 pub ty: Type, 747 pub ty: Type, 777 pub ty: Type, 849 pub ty: Box<Type>, 935 use crate::ty::{Abi, ReturnType, Type, TypePath, TypeReference}; [all …]
|
| H A D | ty.rs | 247 pub ty: Type, 289 use crate::ty::{ 330 if let Type::Path(mut ty) = *group.elem { in ambig_ty() 331 Path::parse_rest(input, &mut ty.path, false)?; in ambig_ty() 332 return Ok(Type::Path(ty)); in ambig_ty() 340 ty: group.elem, in ambig_ty() 348 if let Type::Path(mut ty) = *group.elem { in ambig_ty() 349 let arguments = &mut ty.path.segments.last_mut().unwrap().arguments; in ambig_ty() 352 Path::parse_rest(input, &mut ty.path, false)?; in ambig_ty() 353 return Ok(Type::Path(ty)); in ambig_ty() [all …]
|
| H A D | path.rs | 11 use crate::ty::{ReturnType, Type}; 218 pub ty: Type, 278 pub ty: Box<Type>, 306 use crate::ty::{ReturnType, Type}; 331 Type::Path(mut ty) in parse() 332 if ty.qself.is_none() in parse() 333 && ty.path.leading_colon.is_none() in parse() 334 && ty.path.segments.len() == 1 in parse() 335 && match &ty.path.segments[0].arguments { in parse() 341 let segment = ty.path.segments.pop().unwrap().into_value(); in parse() [all …]
|
| H A D | parse_macro_input.rs | 111 ($tokenstream:ident as $ty:ty) => { 112 match $crate::parse::<$ty>($tokenstream) {
|
| H A D | data.rs | 9 use crate::ty::Type; 200 pub ty: Type, 218 let span = crate::spanned::Spanned::span(&field.ty); in next() 256 use crate::ty::Type; 339 let ty: Type = if unnamed_field in parse_named() localVariable 357 ty, in parse_named() 370 ty: input.parse()?, in parse_unnamed() 423 self.ty.to_tokens(tokens); in to_tokens()
|
| /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) $func:ident[$variant:ident $($rest:ident)*]($($arg_sig:tt)*) $(-> $ret:ty)? { 182 ($ctype:ident) $func:ident[]($($arg_sig:tt)*) $( -> $ret:ty)? { 199 fn $func:ident [$($variant:ident),*]($($arg_sig:tt)*) $( -> $ret:ty)? { 219 $ty [all...] |
| /linux/rust/zerocopy/src/ |
| H A D | impls.rs | 183 ($($nonzero:ident[$prim:ty]),*) => { 403 ($($atomics:tt [$primitives:ty]),* $(,)?) => { 421 ($($($tyvar:ident)? => $atomic:ty [$prim:ty]),*) => {{ 1426 ($($tys:ty),*) => { in test_impls() 1451 …($ty:ty $(,$tys:ty)* => @success $($success_case:expr),* $(, @failure $($failure_case:expr),*)?) =… in test_impls() 1452 impl TryFromBytesTestable for $ty { in test_impls() 1461 …($($($ty:ty),* => @success $($success_case:expr), * $(, @failure $($failure_case:expr),*)?;)*) => { in test_impls() 1463 …impl_try_from_bytes_testable!($($ty),* => @success $($success_case),* $(, @failure $($failure_case… in test_impls() 1670 ($fn_name:ident($ty:ty) $(: $($tys:ty),*)?) => {{ in test_impls() 1676 let id = TypeId::of::<$ty>(); in test_impls() [all …]
|
| /linux/lib/crypto/ |
| H A D | arc4.c | 42 u32 ty, ta, tb; in arc4_crypt() local 60 ty = (y + ta) & 0xff; in arc4_crypt() 61 tb = S[ty]; in arc4_crypt() 65 y = ty; in arc4_crypt()
|
| /linux/rust/kernel/pci/ |
| H A D | io.rs | 114 /// Implements [`IoCapable`] on [`ConfigSpace`] for `$ty` using `$read_fn` and `$write_fn`. 116 ($ty:ty, $read_fn:ident, $write_fn:ident) => { 117 impl IoCapable<$ty> for ConfigSpaceBackend { 118 fn io_read(view: ConfigSpace<'_, $ty>) -> $ty { 124 let mut val: $ty = 0; 132 fn io_write(view: ConfigSpace<'_, $ty>, value: $ty) { in maxsize()
|
| /linux/rust/kernel/list/ |
| H A D | impl_list_item_mod.rs | 36 for $self:ty 81 HasSelfPtr<$item_type:ty $(, $id:tt)?> 82 for $self:ty 189 $(impl$({$($generics:tt)*})? ListItem<$num:tt> for $self:ty { 255 $(impl$({$($generics:tt)*})? ListItem<$num:tt> for $self:ty {
|
| /linux/rust/ |
| H A D | ffi.rs | 14 ($($name:ident = $ty:ty;)*) => {$( 16 pub type $name = $ty;
|
| /linux/rust/pin-init/src/ |
| H A D | lib.rs | 490 (let $var:ident $(: $t:ty)? = $val:expr) => { 560 (let $var:ident $(: $t:ty)? = $val:expr) => { 565 (let $var:ident $(: $t:ty)? =? $val:expr) => { 857 ($ty:ty, $field:ident, $field_ty:ty, inline) => { 859 let _ = move |ptr: *mut $ty| unsafe { 860 let data = <$ty as $crate::__internal::HasPinData>::__pin_data(); 867 ($ty:ty, $field:ident, $field_ty:ty) => { 869 $crate::assert_pinned!($ty, $field, $field_ty, inline); 1621 ($($({$($generics:tt)*})? $t:ty, )*) => { 1722 ($($({$($generics:tt)*})? $t:ty, )*) => {
|
| /linux/rust/zerocopy/src/pointer/ |
| H A D | ptr.rs | 1475 ($test_name:ident: $ty:ty) => { 1479 const S: usize = core::mem::size_of::<$ty>(); 1481 test::<$ty, _, N>([None]); 1487 test::<[$ty], _, N>([Some(0), Some(1), Some(2), Some(3)]); 1488 test::<SliceDst<$ty>, _, N>([Some(0), Some(1), Some(2), Some(3)]); 1490 test::<[$ty], _, N>([None, Some(0), Some(1), Some(2), Some(3)]); 1491 test::<SliceDst<$ty>, _, N>([None, Some(0), Some(1), Some(2), Some(3)]); 1495 ($ty:ident) => { 1496 test!($ty: $ty); 1498 ($($ty:ident),*) => { $(test!($ty);)* } [all …]
|