@@ -406,7 +406,10 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
406
406
407
407
/// Check if this is a value of primitive type, and if yes check the validity of the value
408
408
/// 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 > {
410
413
// Go over all the primitive types
411
414
let ty = value. layout . ty ;
412
415
match ty. kind {
@@ -487,8 +490,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
487
490
| ty:: Str
488
491
| ty:: Dynamic ( ..)
489
492
| ty:: Closure ( ..)
490
- | ty:: Generator ( ..)
491
- | ty:: GeneratorWitness ( ..) => Ok ( false ) ,
493
+ | ty:: Generator ( ..) => Ok ( false ) ,
492
494
// Some types only occur during typechecking, they have no layout.
493
495
// We should not see them here and we could not check them anyway.
494
496
ty:: Error
@@ -498,7 +500,8 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M
498
500
| ty:: Param ( ..)
499
501
| ty:: Opaque ( ..)
500
502
| ty:: UnnormalizedProjection ( ..)
501
- | ty:: Projection ( ..) => bug ! ( "Encountered invalid type {:?}" , ty) ,
503
+ | ty:: Projection ( ..)
504
+ | ty:: GeneratorWitness ( ..) => bug ! ( "Encountered invalid type {:?}" , ty) ,
502
505
}
503
506
}
504
507
0 commit comments