From 1c9e621308f08a96b7f11b48ae9155d7a411bcbe 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 8d25dc5b718..aa22b8c7c58 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 @@ fn project( 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()?))