Skip to content

Commit 402b50a

Browse files
committed
Improve variable names
1 parent 61a6f18 commit 402b50a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

crates/core_simd/src/alias.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ macro_rules! plural {
1414
macro_rules! alias {
1515
{
1616
$(
17-
$element:ty = {
18-
$($alias:ident $elements:tt)*
17+
$element_ty:ty = {
18+
$($alias:ident $num_elements:tt)*
1919
}
2020
)*
2121
} => {
2222
$(
2323
$(
24-
#[doc = concat!("A SIMD vector with ", number!($elements), " element", plural!($elements), " of type [`", stringify!($element), "`].")]
24+
#[doc = concat!("A SIMD vector with ", number!($num_elements), " element", plural!($num_elements), " of type [`", stringify!($element_ty), "`].")]
2525
#[allow(non_camel_case_types)]
26-
pub type $alias = $crate::simd::Simd<$element, $elements>;
26+
pub type $alias = $crate::simd::Simd<$element_ty, $num_elements>;
2727
)*
2828
)*
2929
}
@@ -32,21 +32,21 @@ macro_rules! alias {
3232
macro_rules! mask_alias {
3333
{
3434
$(
35-
$element:ty : $size:literal = {
36-
$($alias:ident $elements:tt)*
35+
$element_ty:ty : $size:literal = {
36+
$($alias:ident $num_elements:tt)*
3737
}
3838
)*
3939
} => {
4040
$(
4141
$(
42-
#[doc = concat!("A SIMD mask with ", number!($elements), " element", plural!($elements), " for vectors with ", $size, " element types.")]
42+
#[doc = concat!("A SIMD mask with ", number!($num_elements), " element", plural!($num_elements), " for vectors with ", $size, " element types.")]
4343
///
4444
#[doc = concat!(
4545
"The layout of this type is unspecified, and may change between platforms and/or Rust versions, and code should not assume that it is equivalent to `[",
46-
stringify!($element), "; ", $elements, "]`."
46+
stringify!($element_ty), "; ", $num_elements, "]`."
4747
)]
4848
#[allow(non_camel_case_types)]
49-
pub type $alias = $crate::simd::Mask<$element, $elements>;
49+
pub type $alias = $crate::simd::Mask<$element_ty, $num_elements>;
5050
)*
5151
)*
5252
}

0 commit comments

Comments
 (0)