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

@ -799,9 +799,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
unevaluated,
Some(obligation.cause.span),
) {
Ok(Some(valtree)) => {
Ok(ty::Const::from_value(selcx.tcx(), valtree, c.ty()))
}
Ok(Some(valtree)) => Ok(selcx.tcx().mk_const(valtree, c.ty())),
Ok(None) => {
let tcx = self.tcx;
let def_id = unevaluated.def.did;