use ty::Unevaluated instead of def substs pair

This commit is contained in:
lcnr 2021-07-19 13:52:43 +02:00
parent 031243898e
commit caa975c89e
19 changed files with 66 additions and 86 deletions

View file

@ -134,11 +134,11 @@ where
ty.visit_with(self)
}
ty::PredicateKind::RegionOutlives(..) => ControlFlow::CONTINUE,
ty::PredicateKind::ConstEvaluatable(defs, substs)
ty::PredicateKind::ConstEvaluatable(uv)
if self.def_id_visitor.tcx().features().const_evaluatable_checked =>
{
let tcx = self.def_id_visitor.tcx();
if let Ok(Some(ct)) = AbstractConst::new(tcx, defs, substs) {
if let Ok(Some(ct)) = AbstractConst::new(tcx, uv) {
self.visit_abstract_const_expr(tcx, ct)?;
}
ControlFlow::CONTINUE