Remove Const::from_value
...it's just `mk_const` but without the sparcles
This commit is contained in:
parent
26b87bf8ff
commit
f4d00fe785
6 changed files with 9 additions and 19 deletions
|
@ -125,11 +125,11 @@ fn recurse_build<'tcx>(
|
|||
}
|
||||
&ExprKind::NonHirLiteral { lit, user_ty: _ } => {
|
||||
let val = ty::ValTree::from_scalar_int(lit);
|
||||
ty::Const::from_value(tcx, val, node.ty)
|
||||
tcx.mk_const(val, node.ty)
|
||||
}
|
||||
&ExprKind::ZstLiteral { user_ty: _ } => {
|
||||
let val = ty::ValTree::zst();
|
||||
ty::Const::from_value(tcx, val, node.ty)
|
||||
tcx.mk_const(val, node.ty)
|
||||
}
|
||||
&ExprKind::NamedConst { def_id, substs, user_ty: _ } => {
|
||||
let uneval = ty::UnevaluatedConst::new(ty::WithOptConstParam::unknown(def_id), substs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue