Introduce GeneratorWitnessMIR.
This commit is contained in:
@@ -896,6 +896,7 @@ impl<'tcx> Ty<'tcx> {
|
||||
| ty::Foreign(_)
|
||||
| ty::Generator(..)
|
||||
| ty::GeneratorWitness(_)
|
||||
| ty::GeneratorWitnessMIR(..)
|
||||
| ty::Infer(_)
|
||||
| ty::Alias(..)
|
||||
| ty::Param(_)
|
||||
@@ -935,6 +936,7 @@ impl<'tcx> Ty<'tcx> {
|
||||
| ty::Foreign(_)
|
||||
| ty::Generator(..)
|
||||
| ty::GeneratorWitness(_)
|
||||
| ty::GeneratorWitnessMIR(..)
|
||||
| ty::Infer(_)
|
||||
| ty::Alias(..)
|
||||
| ty::Param(_)
|
||||
@@ -1062,7 +1064,10 @@ impl<'tcx> Ty<'tcx> {
|
||||
false
|
||||
}
|
||||
|
||||
ty::Foreign(_) | ty::GeneratorWitness(..) | ty::Error(_) => false,
|
||||
ty::Foreign(_)
|
||||
| ty::GeneratorWitness(..)
|
||||
| ty::GeneratorWitnessMIR(..)
|
||||
| ty::Error(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1158,6 +1163,7 @@ pub fn needs_drop_components<'tcx>(
|
||||
| ty::FnPtr(_)
|
||||
| ty::Char
|
||||
| ty::GeneratorWitness(..)
|
||||
| ty::GeneratorWitnessMIR(..)
|
||||
| ty::RawPtr(_)
|
||||
| ty::Ref(..)
|
||||
| ty::Str => Ok(SmallVec::new()),
|
||||
@@ -1228,7 +1234,11 @@ pub fn is_trivially_const_drop(ty: Ty<'_>) -> bool {
|
||||
|
||||
// Not trivial because they have components, and instead of looking inside,
|
||||
// we'll just perform trait selection.
|
||||
ty::Closure(..) | ty::Generator(..) | ty::GeneratorWitness(_) | ty::Adt(..) => false,
|
||||
ty::Closure(..)
|
||||
| ty::Generator(..)
|
||||
| ty::GeneratorWitness(_)
|
||||
| ty::GeneratorWitnessMIR(..)
|
||||
| ty::Adt(..) => false,
|
||||
|
||||
ty::Array(ty, _) | ty::Slice(ty) => is_trivially_const_drop(ty),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user