| /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 | 93 ($ty:ident) => { 94 impl ModuleParam for $ty { 96 <$ty as crate::str::parse_int::ParseInt>::from_str(arg) 188 ($ops:ident, $ty:ty) => { 192 set: Some(set_param::<$ty>),
|
| H A D | configfs.rs | 777 ($tpe:ty) => { 931 container: $container:ty, 932 data: $data:ty, 950 container: $container:ty, 951 data: $data:ty, 952 child: $child:ty, 970 @container($container:ty), 971 @data($data:ty), 972 @child($($child:ty)?), 1007 @container($container:ty), [all...] |
| H A D | bitfield.rs | 295 $(#[$attr:meta])* $vis:vis struct $name:ident($storage:ty) { $($fields:tt)* } 306 (@core $(#[$attr:meta])* $vis:vis $name:ident $storage:ty) => { 361 (@fields $vis:vis $name:ident $storage:ty { 363 $(?=> $try_into_type:ty)? 364 $(=> $into_type:ty)? 386 @private_field_accessors $vis:vis $name:ident $storage:ty : $hi:tt:$lo:tt $field:ident 431 @public_field_accessors $(#[doc = $doc:expr])* $vis:vis $name:ident $storage:ty : 432 $hi:literal:$lo:literal $field:ident => $into_type:ty 457 @public_field_accessors $(#[doc = $doc:expr])* $vis:vis $name:ident $storage:ty : 458 $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) => {
|
| /linux/rust/zerocopy/src/util/ |
| H A D | macros.rs | 20 /// initialized sequence of bytes constitutes a valid instance of `$ty`. 22 /// return `true` if its argument refers to a valid `$ty`. 24 // Implement `$trait` for `$ty` with no bounds. 25 ($(#[$attr:meta])* $ty:ty: $trait:ident $(; |$candidate:ident| $is_safe:expr)?) => {{ 30 unsafe impl $trait for $ty { 35 // Implement all `$traits` for `$ty` with no bounds. 41 // ($(#[$attrs:meta])* $ty:ty: $($traits:ident),*) => { 42 // $( unsafe_impl!( $(#[$attrs])* $ty [all...] |
| H A D | macro_util.rs | 128 /// the type `$ty`. 137 ($ty:ty, $trailing_field_name:tt) => {{ 147 // - If `$ty` is `Sized`, `size_of_val_raw` is always safe to call. 149 // - If `$ty` is not a slice DST, this pointer conversion will 152 // - If `$ty` is a slice DST, we have constructed `zero_elems` to 161 zero_elems as *const $ty, 169 let ptr = ALIGNED_64K_ALLOCATION.as_ptr() as *const $ty; 179 // [1], we know that `$ty`'s alignment is no larger than `_64K`. The 181 // be aligned to `_64K`, so `ptr` is guaranteed to satisfy `$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]),*) => {{ 1431 ($($tys:ty),*) => { in test_impls() 1456 ($ty:ty $(,$tys:ty)* => @success $($success_case:expr),* $(, @failure $($failure_case:expr),*)?) => { in test_impls() 1457 impl TryFromBytesTestable for $ty { in test_impls() 1466 ($($($ty in test_impls() [all...] |
| H A D | byteorder.rs | 492 [$($larger_native:ty),*], 493 [$($larger_native_try:ty),*], 910 ($ty:ty, $bits:ident, $bytes:expr, $mod:ident) => { 914 define_float_conversion!($ty, $bits, $bytes, from_be_bytes, to_be_bytes); 915 define_float_conversion!($ty, $bits, $bytes, from_le_bytes, to_le_bytes); 918 ($ty:ty, $bits:ident, $bytes:expr, $from:ident, $to:ident) => { 922 pub(crate) const fn $from(bytes: [u8; $bytes]) -> $ty { 926 pub(crate) const fn $to(f: $ty) [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/pin-init/src/ |
| H A D | lib.rs | 513 (let $var:ident $(: $t:ty)? = $val:expr) => { 583 (let $var:ident $(: $t:ty)? = $val:expr) => { 588 (let $var:ident $(: $t:ty)? =? $val:expr) => { 920 ($ty:ty, $field:ident, $field_ty:ty, inline) => { 922 let _ = move |ptr: *mut $ty| unsafe { 923 let data = <$ty as $crate::__internal::HasInitData>::__init_data(); 932 ($ty:ty, [all...] |
| /linux/rust/ |
| H A D | ffi.rs | 14 ($($name:ident = $ty:ty;)*) => {$( 16 pub type $name = $ty;
|
| /linux/rust/zerocopy/src/pointer/ |
| H A D | ptr.rs | 1528 ($test_name:ident: $ty:ty) => { in test_try_cast_into_explicit_count() 1532 const S: usize = core::mem::size_of::<$ty>(); in test_try_cast_into_explicit_count() 1534 test::<$ty, _, N>([None]); in test_try_cast_into_explicit_count() 1536 // If `$ty` is a ZST, then we can't pass `None` as the in test_try_cast_into_explicit_count() 1540 test::<[$ty], _, N>([Some(0), Some(1), Some(2), Some(3)]); in test_try_cast_into_explicit_count() 1541 test::<SliceDst<$ty>, _, N>([Some(0), Some(1), Some(2), Some(3)]); in test_try_cast_into_explicit_count() 1543 test::<[$ty], _, N>([None, Some(0), Some(1), Some(2), Some(3)]); in test_try_cast_into_explicit_count() 1544 test::<SliceDst<$ty>, _, N>([None, Some(0), Some(1), Some(2), Some(3)]); in test_try_cast_into_explicit_count() 1548 ($ty in test_try_cast_into_explicit_count() [all...] |