about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check/check.rs
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2025-06-04 01:44:40 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2025-06-05 19:15:56 -0700
commit8bce2255e826a11d1aa345d1786f85d22c5f921a (patch)
treec90edaa44e96973f9ac1bab06c7d770d0be58edf /compiler/rustc_hir_analysis/src/check/check.rs
parentccf3198de316b488ee17441935182e9d5292b4d3 (diff)
downloadrust-8bce2255e826a11d1aa345d1786f85d22c5f921a.tar.gz
rust-8bce2255e826a11d1aa345d1786f85d22c5f921a.zip
Update `InterpCx::project_field` to take `FieldIdx`
As suggested by Ralf in 142005.

Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/check.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/check/check.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs
index 846eacce9e1..5d42de74f6c 100644
--- a/compiler/rustc_hir_analysis/src/check/check.rs
+++ b/compiler/rustc_hir_analysis/src/check/check.rs
@@ -1100,7 +1100,7 @@ fn check_simd(tcx: TyCtxt<'_>, sp: Span, def_id: LocalDefId) {
             return;
         };
 
-        if let Some(second_field) = fields.get(FieldIdx::from_u32(1)) {
+        if let Some(second_field) = fields.get(FieldIdx::ONE) {
             struct_span_code_err!(tcx.dcx(), sp, E0075, "SIMD vector cannot have multiple fields")
                 .with_span_label(tcx.def_span(second_field.did), "excess field")
                 .emit();