mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-03 13:37:37 +00:00
Remove obsolete macros
This commit is contained in:
parent
2720ccc5a7
commit
62d98e3a11
@ -26,115 +26,6 @@ macro_rules! from_transmute_x86 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Calls a the macro `$mac` with the provided `$args` followed by `$repeat` repeated the specified
|
||||
/// number of times.
|
||||
macro_rules! call_repeat {
|
||||
{ 1 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
$($repeat)*
|
||||
}
|
||||
};
|
||||
{ 2 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
$($repeat)* $($repeat)*
|
||||
}
|
||||
};
|
||||
{ 4 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
}
|
||||
};
|
||||
{ 8 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
}
|
||||
};
|
||||
{ 16 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
}
|
||||
};
|
||||
{ 32 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
}
|
||||
};
|
||||
{ 64 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
$($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// Calls the macro `$mac` with the specified `$args` followed by the specified number of unique
|
||||
/// identifiers.
|
||||
macro_rules! call_counting_args {
|
||||
{ 1 => $mac:path => $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
value
|
||||
}
|
||||
};
|
||||
{ 2 => $mac:path => $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
v0 v1
|
||||
}
|
||||
};
|
||||
{ 4 => $mac:path => $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
v0 v1 v2 v3
|
||||
}
|
||||
};
|
||||
{ 8 => $mac:path => $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
v0 v1 v2 v3 v4 v5 v6 v7
|
||||
}
|
||||
};
|
||||
{ 16 => $mac:path => $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
|
||||
}
|
||||
};
|
||||
{ 32 => $mac:path => $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
|
||||
v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31
|
||||
}
|
||||
};
|
||||
{ 64 => $mac:path => $($args:tt)* } => {
|
||||
$mac! {
|
||||
$($args)*
|
||||
v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
|
||||
v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31
|
||||
v32 v33 v34 v35 v36 v37 v38 v39 v40 v41 v42 v43 v44 v45 v46 v47
|
||||
v48 v49 v50 v51 v52 v53 v54 v55 v56 v57 v58 v59 v60 v61 v62 v63
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// Implements common traits on the specified vector `$name`, holding multiple `$lanes` of `$type`.
|
||||
macro_rules! impl_vector {
|
||||
{ $name:ident, $type:ty } => {
|
||||
|
@ -1,6 +1,7 @@
|
||||
//! Types and traits associated with masking lanes of vectors.
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
/// Implements bitwise ops on mask types by delegating the operators to the inner type.
|
||||
macro_rules! delegate_ops_to_inner {
|
||||
{ $name:ident } => {
|
||||
impl<const LANES: usize> core::ops::BitAnd for $name<LANES> {
|
||||
|
@ -262,21 +262,6 @@ macro_rules! impl_float_ops {
|
||||
};
|
||||
}
|
||||
|
||||
/// Implements mask operators for the provided types.
|
||||
macro_rules! impl_mask_ops {
|
||||
{ $($scalar:ty => $($vector:ident),*;)* } => {
|
||||
$( // scalar
|
||||
$( // vector
|
||||
impl_op! { impl BitAnd for $vector, $scalar }
|
||||
impl_op! { impl BitOr for $vector, $scalar }
|
||||
impl_op! { impl BitXor for $vector, $scalar }
|
||||
impl_op! { impl Not for $vector, $scalar }
|
||||
impl_op! { impl Index for $vector, $scalar }
|
||||
)*
|
||||
)*
|
||||
};
|
||||
}
|
||||
|
||||
/// Implements unsigned integer operators for the provided types.
|
||||
macro_rules! impl_unsigned_int_ops {
|
||||
{ $($scalar:ty => $($vector:ident),*;)* } => {
|
||||
|
Loading…
Reference in New Issue
Block a user