about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check/check.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-06 23:53:18 +0200
committerGitHub <noreply@github.com>2025-06-06 23:53:18 +0200
commit3a6f1b03757ce930ad0010e8d76cc0cf6518a535 (patch)
tree21225b76270688091b6fc372a92e36f931c13d17 /compiler/rustc_hir_analysis/src/check/check.rs
parent2946ce29ed456df5664e315dee888902b7ac3ec5 (diff)
parentf9cf0964db531b234e374dfd6330e0aa0c427db0 (diff)
downloadrust-3a6f1b03757ce930ad0010e8d76cc0cf6518a535.tar.gz
rust-3a6f1b03757ce930ad0010e8d76cc0cf6518a535.zip
Rollup merge of #142103 - scottmcm:fieldidx-in-interp, r=oli-obk
Update `InterpCx::project_field` to take `FieldIdx`

As suggested by Ralf in https://github.com/rust-lang/rust/pull/142005#discussion_r2125839015
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 77f6204d595..102fc2a63be 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();