the Const::eval_bits methods don't need to be given the Ty
This commit is contained in:
parent
0692db1a90
commit
a2374e65aa
13 changed files with 35 additions and 48 deletions
|
@ -23,7 +23,7 @@ impl<'tcx> MirPass<'tcx> for SimplifyConstCondition {
|
|||
TerminatorKind::SwitchInt {
|
||||
discr: Operand::Constant(ref c), ref targets, ..
|
||||
} => {
|
||||
let constant = c.literal.try_eval_bits(tcx, param_env, c.ty());
|
||||
let constant = c.literal.try_eval_bits(tcx, param_env);
|
||||
if let Some(constant) = constant {
|
||||
let target = targets.target_for_value(constant);
|
||||
TerminatorKind::Goto { target }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue