require a tcx for TypeVisitor

This commit is contained in:
lcnr 2021-03-13 16:05:15 +01:00
parent 76e755cf4a
commit f4b606fd17
24 changed files with 182 additions and 50 deletions

View file

@ -54,6 +54,9 @@ impl<'tcx> BoundVarsCollector<'tcx> {
impl<'tcx> TypeVisitor<'tcx> for BoundVarsCollector<'tcx> {
type BreakTy = ();
fn tcx_for_anon_const_substs(&self) -> TyCtxt<'tcx> {
bug!("default anon const substs can't be bound vars");
}
fn visit_binder<T: TypeFoldable<'tcx>>(
&mut self,
t: &Binder<'tcx, T>,