Introduce GeneratorWitnessMIR.
This commit is contained in:
parent
03618d6afd
commit
1974b6b68d
52 changed files with 265 additions and 72 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue