Skip to content

Commit a8e9b46

Browse files
committed
w
1 parent 5808d42 commit a8e9b46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/promote_consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ impl<'tcx> Validator<'_, 'tcx> {
325325
if let TempState::Defined { location: loc, .. } = self.temps[local]
326326
&& let Left(statement) = self.body.stmt_at(loc)
327327
&& let Some((_, Rvalue::Use(Operand::Constant(c)))) = statement.kind.as_assign()
328-
&& let Some(idx) = c.const_.try_eval_target_usize(self.tcx, self.typing_env)
328+
&& let Some(idx) = c.const_.try_eval_target_usize(self.tcx, self.typing_env)
329329
// Determine the type of the thing we are indexing.
330330
&& let ty::Array(_, len) = place_base.ty(self.body, self.tcx).ty.kind()
331331
// It's an array; determine its length.

0 commit comments

Comments
 (0)