From 5fa508e7a1de848467545a3bc81c41d11e5972fb Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 16 Jan 2024 16:37:43 +0000 Subject: [PATCH] No need to check min_length --- compiler/rustc_mir_transform/src/const_prop_lint.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_mir_transform/src/const_prop_lint.rs b/compiler/rustc_mir_transform/src/const_prop_lint.rs index 884da02513e8a..a6cb993b816f4 100644 --- a/compiler/rustc_mir_transform/src/const_prop_lint.rs +++ b/compiler/rustc_mir_transform/src/const_prop_lint.rs @@ -112,7 +112,7 @@ impl<'tcx> Value<'tcx> { fields.get(FieldIdx::from_u32(idx.try_into().ok()?)).unwrap_or(&Value::Uninit) } ( - PlaceElem::ConstantIndex { offset, min_length: 1, from_end: false }, + PlaceElem::ConstantIndex { offset, min_length: _, from_end: false }, Value::Aggregate { fields, .. }, ) => fields .get(FieldIdx::from_u32(offset.try_into().ok()?))