Relax constrained generics to TypeVisitable

This commit is contained in:
Alan Egerton 2022-06-17 13:10:07 +01:00
parent f66c06f7f2
commit e9e5d0685b
No known key found for this signature in database
GPG key ID: 07CAC3CCA7E0643F
23 changed files with 56 additions and 43 deletions

View file

@ -35,7 +35,8 @@ use rustc_ast::ast;
use rustc_middle::traits::{ChalkEnvironmentAndGoal, ChalkRustInterner as RustInterner};
use rustc_middle::ty::subst::{GenericArg, GenericArgKind, SubstsRef};
use rustc_middle::ty::{
self, Binder, Region, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitor,
self, Binder, Region, Ty, TyCtxt, TypeFoldable, TypeFolder, TypeSuperFoldable, TypeVisitable,
TypeVisitor,
};
use rustc_span::def_id::DefId;
@ -896,7 +897,7 @@ impl<'tcx> BoundVarsCollector<'tcx> {
}
impl<'tcx> TypeVisitor<'tcx> for BoundVarsCollector<'tcx> {
fn visit_binder<T: TypeFoldable<'tcx>>(
fn visit_binder<T: TypeVisitable<'tcx>>(
&mut self,
t: &Binder<'tcx, T>,
) -> ControlFlow<Self::BreakTy> {