make the set of methods between our two Const types more consistent

This commit is contained in:
Ralf Jung 2023-09-12 23:47:47 +02:00
parent 6e4779ab17
commit 11a4a24d8e
8 changed files with 132 additions and 174 deletions

View file

@ -136,7 +136,7 @@ impl<'tcx> InstSimplifyContext<'tcx, '_> {
return;
}
let literal = ConstantKind::from_const(len, self.tcx);
let literal = ConstantKind::from_ty_const(len, self.tcx);
let constant = Constant { span: source_info.span, literal, user_ty: None };
*rvalue = Rvalue::Use(Operand::Constant(Box::new(constant)));
}