the Const::eval_bits methods don't need to be given the Ty
This commit is contained in:
@@ -660,12 +660,12 @@ fn push_const_param<'tcx>(tcx: TyCtxt<'tcx>, ct: ty::Const<'tcx>, output: &mut S
|
||||
}
|
||||
_ => match ct.ty().kind() {
|
||||
ty::Int(ity) => {
|
||||
let bits = ct.eval_bits(tcx, ty::ParamEnv::reveal_all(), ct.ty());
|
||||
let bits = ct.eval_bits(tcx, ty::ParamEnv::reveal_all());
|
||||
let val = Integer::from_int_ty(&tcx, *ity).size().sign_extend(bits) as i128;
|
||||
write!(output, "{val}")
|
||||
}
|
||||
ty::Uint(_) => {
|
||||
let val = ct.eval_bits(tcx, ty::ParamEnv::reveal_all(), ct.ty());
|
||||
let val = ct.eval_bits(tcx, ty::ParamEnv::reveal_all());
|
||||
write!(output, "{val}")
|
||||
}
|
||||
ty::Bool => {
|
||||
|
||||
Reference in New Issue
Block a user