From b7674995b13e5d7831558d57aef031fb11cf9c66 Mon Sep 17 00:00:00 2001 From: David Wood Date: Mon, 2 Mar 2026 15:04:25 +0000 Subject: [PATCH] abi: s/VectorKind/SimdVectorKind Renaming to remove any ambiguity as to what "vector" refers to in this context. --- compiler/rustc_abi/src/layout.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/rustc_abi/src/layout.rs b/compiler/rustc_abi/src/layout.rs index d4dd235eaea6..93c01f289d42 100644 --- a/compiler/rustc_abi/src/layout.rs +++ b/compiler/rustc_abi/src/layout.rs @@ -210,7 +210,7 @@ pub fn scalable_vector_type( VariantIdx: Idx, F: AsRef> + fmt::Debug, { - vector_type_layout(VectorKind::Scalable, self.cx.data_layout(), element, count) + vector_type_layout(SimdVectorKind::Scalable, self.cx.data_layout(), element, count) } pub fn simd_type( @@ -224,7 +224,7 @@ pub fn simd_type( VariantIdx: Idx, F: AsRef> + fmt::Debug, { - let kind = if repr_packed { VectorKind::PackedFixed } else { VectorKind::Fixed }; + let kind = if repr_packed { SimdVectorKind::PackedFixed } else { SimdVectorKind::Fixed }; vector_type_layout(kind, self.cx.data_layout(), element, count) } @@ -1524,7 +1524,7 @@ fn format_field_niches< } } -enum VectorKind { +enum SimdVectorKind { /// `#[rustc_scalable_vector]` Scalable, /// `#[repr(simd, packed)]` @@ -1534,7 +1534,7 @@ enum VectorKind { } fn vector_type_layout( - kind: VectorKind, + kind: SimdVectorKind, dl: &TargetDataLayout, element: F, count: u64, @@ -1559,16 +1559,16 @@ fn vector_type_layout( let size = elt.size.checked_mul(count, dl).ok_or_else(|| LayoutCalculatorError::SizeOverflow)?; let (repr, align) = match kind { - VectorKind::Scalable => { + SimdVectorKind::Scalable => { (BackendRepr::SimdScalableVector { element, count }, dl.llvmlike_vector_align(size)) } // Non-power-of-two vectors have padding up to the next power-of-two. // If we're a packed repr, remove the padding while keeping the alignment as close // to a vector as possible. - VectorKind::PackedFixed if !count.is_power_of_two() => { + SimdVectorKind::PackedFixed if !count.is_power_of_two() => { (BackendRepr::Memory { sized: true }, Align::max_aligned_factor(size)) } - VectorKind::PackedFixed | VectorKind::Fixed => { + SimdVectorKind::PackedFixed | SimdVectorKind::Fixed => { (BackendRepr::SimdVector { element, count }, dl.llvmlike_vector_align(size)) } };