@@ -406,7 +406,10 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
406406
407407 /// Check if this is a value of primitive type, and if yes check the validity of the value
408408 /// at that type. Return `true` if the type is indeed primitive.
409- fn try_visit_primitive ( & mut self , value : OpTy < ' tcx , M :: PointerTag > ) -> InterpResult < ' tcx , bool > {
409+ fn try_visit_primitive (
410+ & mut self ,
411+ value : OpTy < ' tcx , M :: PointerTag > ,
412+ ) -> InterpResult < ' tcx , bool > {
410413 // Go over all the primitive types
411414 let ty = value. layout . ty ;
412415 match ty. kind {
@@ -487,8 +490,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
487490 | ty:: Str
488491 | ty:: Dynamic ( ..)
489492 | ty:: Closure ( ..)
490- | ty:: Generator ( ..)
491- | ty:: GeneratorWitness ( ..) => Ok ( false ) ,
493+ | ty:: Generator ( ..) => Ok ( false ) ,
492494 // Some types only occur during typechecking, they have no layout.
493495 // We should not see them here and we could not check them anyway.
494496 ty:: Error
@@ -498,7 +500,8 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
498500 | ty:: Param ( ..)
499501 | ty:: Opaque ( ..)
500502 | ty:: UnnormalizedProjection ( ..)
501- | ty:: Projection ( ..) => bug ! ( "Encountered invalid type {:?}" , ty) ,
503+ | ty:: Projection ( ..)
504+ | ty:: GeneratorWitness ( ..) => bug ! ( "Encountered invalid type {:?}" , ty) ,
502505 }
503506 }
504507
0 commit comments