Introduce GeneratorWitnessMIR.
This commit is contained in:
parent
03618d6afd
commit
1974b6b68d
52 changed files with 265 additions and 72 deletions
|
@ -151,7 +151,7 @@ pub(crate) fn const_to_valtree_inner<'tcx>(
|
|||
// FIXME(oli-obk): we can probably encode closures just like structs
|
||||
| ty::Closure(..)
|
||||
| ty::Generator(..)
|
||||
| ty::GeneratorWitness(..) => Err(ValTreeCreationError::NonSupportedType),
|
||||
| ty::GeneratorWitness(..) |ty::GeneratorWitnessMIR(..)=> Err(ValTreeCreationError::NonSupportedType),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,6 +314,7 @@ pub fn valtree_to_const_value<'tcx>(
|
|||
| ty::Closure(..)
|
||||
| ty::Generator(..)
|
||||
| ty::GeneratorWitness(..)
|
||||
| ty::GeneratorWitnessMIR(..)
|
||||
| ty::FnPtr(_)
|
||||
| ty::RawPtr(_)
|
||||
| ty::Str
|
||||
|
|
|
@ -101,6 +101,7 @@ pub(crate) fn eval_nullary_intrinsic<'tcx>(
|
|||
| ty::Closure(_, _)
|
||||
| ty::Generator(_, _, _)
|
||||
| ty::GeneratorWitness(_)
|
||||
| ty::GeneratorWitnessMIR(_, _)
|
||||
| ty::Never
|
||||
| ty::Tuple(_)
|
||||
| ty::Error(_) => ConstValue::from_machine_usize(0u64, &tcx),
|
||||
|
|
|
@ -602,6 +602,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
|
|||
| ty::Bound(..)
|
||||
| ty::Param(..)
|
||||
| ty::Alias(..)
|
||||
| ty::GeneratorWitnessMIR(..)
|
||||
| ty::GeneratorWitness(..) => bug!("Encountered invalid type {:?}", ty),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ impl<'tcx> Printer<'tcx> for AbsolutePathPrinter<'tcx> {
|
|||
ty::Foreign(def_id) => self.print_def_path(def_id, &[]),
|
||||
|
||||
ty::GeneratorWitness(_) => bug!("type_name: unexpected `GeneratorWitness`"),
|
||||
ty::GeneratorWitnessMIR(..) => bug!("type_name: unexpected `GeneratorWitnessMIR`"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue