Introduce TypeVisitor::BreakTy

This commit is contained in:
LeSeulArtichaut 2020-11-05 17:30:39 +01:00
parent 30e49a9ead
commit e0f3119103
31 changed files with 157 additions and 128 deletions

View file

@ -1135,7 +1135,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
};
impl<'a, 'tcx> ty::fold::TypeVisitor<'tcx> for ProhibitOpaqueTypes<'a, 'tcx> {
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<()> {
fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
match ty.kind() {
ty::Opaque(..) => {
self.ty = Some(ty);