Relax validation now

This commit is contained in:
Michael Goulet
2024-03-24 21:14:49 -04:00
parent b7d67eace7
commit 9bda9ac76e
2 changed files with 4 additions and 7 deletions

View File

@@ -694,8 +694,6 @@ impl<'tcx> CoroutineArgs<'tcx> {
#[inline]
pub fn variant_range(&self, def_id: DefId, tcx: TyCtxt<'tcx>) -> Range<VariantIdx> {
// FIXME requires optimized MIR
// FIXME(async_closures): We should assert all coroutine layouts have
// the same number of variants.
FIRST_VARIANT
..tcx.coroutine_layout(def_id, tcx.types.unit).unwrap().variant_fields.next_index()
}