1
Fork 0

Remove Const::from_value

...it's just `mk_const` but without the sparcles
This commit is contained in:
Maybe Waffle 2022-11-28 12:38:15 +00:00
parent 26b87bf8ff
commit f4d00fe785
6 changed files with 9 additions and 19 deletions

View file

@ -1580,7 +1580,7 @@ impl<'tcx> InferCtxt<'tcx> {
span: Option<Span>,
) -> Result<ty::Const<'tcx>, ErrorHandled> {
match self.const_eval_resolve(param_env, unevaluated, span) {
Ok(Some(val)) => Ok(ty::Const::from_value(self.tcx, val, ty)),
Ok(Some(val)) => Ok(self.tcx.mk_const(val, ty)),
Ok(None) => {
let tcx = self.tcx;
let def_id = unevaluated.def.did;