1
Fork 0

Introduce GeneratorWitnessMIR.

This commit is contained in:
Camille GILLOT 2022-10-01 14:56:24 +02:00
parent 03618d6afd
commit 1974b6b68d
52 changed files with 265 additions and 72 deletions

View file

@ -435,6 +435,7 @@ impl<'cx, 'tcx> TypeFolder<'tcx> for Canonicalizer<'cx, 'tcx> {
ty::Closure(..)
| ty::Generator(..)
| ty::GeneratorWitness(..)
| ty::GeneratorWitnessMIR(..)
| ty::Bool
| ty::Char
| ty::Int(..)

View file

@ -209,6 +209,7 @@ impl<'a, 'tcx> TypeFolder<'tcx> for TypeFreshener<'a, 'tcx> {
| ty::Foreign(..)
| ty::Param(..)
| ty::Closure(..)
| ty::GeneratorWitnessMIR(..)
| ty::GeneratorWitness(..) => t.super_fold_with(self),
ty::Placeholder(..) | ty::Bound(..) => bug!("unexpected type {:?}", t),

View file

@ -112,7 +112,7 @@ fn compute_components<'tcx>(
}
// All regions are bound inside a witness
ty::GeneratorWitness(..) => (),
ty::GeneratorWitness(..) | ty::GeneratorWitnessMIR(..) => (),
// OutlivesTypeParameterEnv -- the actual checking that `X:'a`
// is implied by the environment is done in regionck.