support const_evaluatable_checked across crate boundaries

This commit is contained in:
Bastian Kauschke 2020-09-11 21:16:16 +02:00
parent 82ebbd7d6b
commit 30ff1ef3d0
14 changed files with 157 additions and 2 deletions

View file

@ -97,6 +97,15 @@ where
ty.visit_with(self)
}
ty::PredicateAtom::RegionOutlives(..) => false,
ty::PredicateAtom::ConstEvaluatable(..)
if self.def_id_visitor.tcx().features().const_evaluatable_checked =>
{
// FIXME(const_evaluatable_checked): If the constant used here depends on a
// private function we may have to do something here...
//
// For now, let's just pretend that everything is fine.
false
}
_ => bug!("unexpected predicate: {:?}", predicate),
}
}