Skip to content

Commit 6906379

Browse files
committed
Remove a now-dead function argument
1 parent 8b0dd6d commit 6906379

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/librustc_mir/const_eval.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,13 @@ pub(crate) fn eval_promoted<'a, 'mir, 'tcx>(
6666
pub fn op_to_const<'tcx>(
6767
ecx: &CompileTimeEvalContext<'_, '_, 'tcx>,
6868
op: OpTy<'tcx>,
69-
may_normalize: bool,
7069
) -> EvalResult<'tcx, ty::Const<'tcx>> {
7170
// We do not normalize just any data. Only scalar layout and slices.
72-
let normalize = may_normalize
73-
&& match op.layout.abi {
74-
layout::Abi::Scalar(..) => true,
75-
layout::Abi::ScalarPair(..) => op.layout.ty.is_slice(),
76-
_ => false,
77-
};
71+
let normalize = match op.layout.abi {
72+
layout::Abi::Scalar(..) => true,
73+
layout::Abi::ScalarPair(..) => op.layout.ty.is_slice(),
74+
_ => false,
75+
};
7876
let normalized_op = if normalize {
7977
ecx.try_read_immediate(op)?
8078
} else {
@@ -489,7 +487,7 @@ pub fn const_field<'a, 'tcx>(
489487
let field = ecx.operand_field(down, field.index() as u64)?;
490488
// and finally move back to the const world, always normalizing because
491489
// this is not called for statics.
492-
op_to_const(&ecx, field, true)
490+
op_to_const(&ecx, field)
493491
})();
494492
result.map_err(|error| {
495493
let err = error_to_const_error(&ecx, error);

0 commit comments

Comments
 (0)