1
Fork 0

initial revert

This commit is contained in:
Ellen 2022-01-12 03:19:52 +00:00
parent b0ec3e09a9
commit 71bbb603f4
127 changed files with 540 additions and 1050 deletions

View file

@ -135,11 +135,11 @@ where
ty.visit_with(self)
}
ty::PredicateKind::RegionOutlives(..) => ControlFlow::CONTINUE,
ty::PredicateKind::ConstEvaluatable(uv)
ty::PredicateKind::ConstEvaluatable(defs, substs)
if self.def_id_visitor.tcx().features().generic_const_exprs =>
{
let tcx = self.def_id_visitor.tcx();
if let Ok(Some(ct)) = AbstractConst::new(tcx, uv) {
if let Ok(Some(ct)) = AbstractConst::new(tcx, defs, substs) {
self.visit_abstract_const_expr(tcx, ct)?;
}
ControlFlow::CONTINUE
@ -177,10 +177,6 @@ where
{
type BreakTy = V::BreakTy;
fn tcx_for_anon_const_substs(&self) -> Option<TyCtxt<'tcx>> {
Some(self.def_id_visitor.tcx())
}
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<V::BreakTy> {
let tcx = self.def_id_visitor.tcx();
// InternalSubsts are not visited here because they are visited below in `super_visit_with`.