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

@ -470,7 +470,10 @@ fn layout_of_uncached<'tcx>(
return Err(LayoutError::Unknown(ty));
}
ty::Placeholder(..) | ty::GeneratorWitness(..) | ty::Infer(_) => {
ty::Placeholder(..)
| ty::GeneratorWitness(..)
| ty::GeneratorWitnessMIR(..)
| ty::Infer(_) => {
bug!("Layout::compute: unexpected type `{}`", ty)
}

View file

@ -16,7 +16,13 @@ fn sized_constraint_for_ty<'tcx>(
Bool | Char | Int(..) | Uint(..) | Float(..) | RawPtr(..) | Ref(..) | FnDef(..)
| FnPtr(_) | Array(..) | Closure(..) | Generator(..) | Never => vec![],
Str | Dynamic(..) | Slice(_) | Foreign(..) | Error(_) | GeneratorWitness(..) => {
Str
| Dynamic(..)
| Slice(_)
| Foreign(..)
| Error(_)
| GeneratorWitness(..)
| GeneratorWitnessMIR(..) => {
// these are never sized - return the target type
vec![ty]
}