diff options
| author | Ralf Jung <post@ralfj.de> | 2020-03-02 22:47:28 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-03-06 22:41:50 +0100 |
| commit | 295c2d69bd425e8258f197252d2f100e08f478d8 (patch) | |
| tree | 637820c265f97a6bcf7f0cb4538b25ae6614b18a /src | |
| parent | 58f8cc21352613639fdc58f4f8a59f5c579b5372 (diff) | |
| download | rust-295c2d69bd425e8258f197252d2f100e08f478d8.tar.gz rust-295c2d69bd425e8258f197252d2f100e08f478d8.zip | |
bug on ty::GeneratorWitness
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/interpret/validity.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index 29d18e87c4f..0fba8a5c15c 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -406,7 +406,10 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M /// Check if this is a value of primitive type, and if yes check the validity of the value /// at that type. Return `true` if the type is indeed primitive. - fn try_visit_primitive(&mut self, value: OpTy<'tcx, M::PointerTag>) -> InterpResult<'tcx, bool> { + fn try_visit_primitive( + &mut self, + value: OpTy<'tcx, M::PointerTag>, + ) -> InterpResult<'tcx, bool> { // Go over all the primitive types let ty = value.layout.ty; match ty.kind { @@ -487,8 +490,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M | ty::Str | ty::Dynamic(..) | ty::Closure(..) - | ty::Generator(..) - | ty::GeneratorWitness(..) => Ok(false), + | ty::Generator(..) => Ok(false), // Some types only occur during typechecking, they have no layout. // We should not see them here and we could not check them anyway. ty::Error @@ -498,7 +500,8 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M | ty::Param(..) | ty::Opaque(..) | ty::UnnormalizedProjection(..) - | ty::Projection(..) => bug!("Encountered invalid type {:?}", ty), + | ty::Projection(..) + | ty::GeneratorWitness(..) => bug!("Encountered invalid type {:?}", ty), } } |
