Explicit TypeVisitable implementations

This commit is contained in:
Alan Egerton
2022-06-17 12:09:23 +01:00
parent 9ffdc2de8c
commit f66c06f7f2
7 changed files with 269 additions and 152 deletions

View File

@@ -1385,7 +1385,9 @@ impl<'tcx> TypeFoldable<'tcx> for ParamEnv<'tcx> {
self.constness().try_fold_with(folder)?,
))
}
}
impl<'tcx> TypeVisitable<'tcx> for ParamEnv<'tcx> {
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
self.caller_bounds().visit_with(visitor)?;
self.reveal().visit_with(visitor)?;