mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
bug on ty::GeneratorWitness
This commit is contained in:
@@ -406,7 +406,10 @@ fn check_safe_pointer(
|
||||
|
||||
/// 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 @@ fn try_visit_primitive(&mut self, value: OpTy<'tcx, M::PointerTag>) -> InterpRes
|
||||
| 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 @@ fn try_visit_primitive(&mut self, value: OpTy<'tcx, M::PointerTag>) -> InterpRes
|
||||
| ty::Param(..)
|
||||
| ty::Opaque(..)
|
||||
| ty::UnnormalizedProjection(..)
|
||||
| ty::Projection(..) => bug!("Encountered invalid type {:?}", ty),
|
||||
| ty::Projection(..)
|
||||
| ty::GeneratorWitness(..) => bug!("Encountered invalid type {:?}", ty),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user