1
Fork 0

Visit param_env field in Obligation's TypeFoldable impl

This oversight appears to have gone unnoticed for a long time
without causing issues, but it should still be fixed.
This commit is contained in:
Aaron Hill 2021-11-24 17:20:52 -06:00
parent 982c552c90
commit a7cc6bc4d0
No known key found for this signature in database
GPG key ID: B4087E510E98B164
6 changed files with 33 additions and 25 deletions

View file

@ -70,6 +70,7 @@ impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for traits::Obligation<'tcx
}
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
self.predicate.visit_with(visitor)
self.predicate.visit_with(visitor)?;
self.param_env.visit_with(visitor)
}
}