1
Fork 0

Handle error body when in generator layout

This commit is contained in:
clubby789 2023-05-13 13:19:01 +01:00
parent 69fef92ab2
commit f77971e221
8 changed files with 49 additions and 11 deletions

View file

@ -2447,10 +2447,9 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
&& generator_did.is_local()
// Try to avoid cycles.
&& !generator_within_in_progress_typeck
&& let Some(generator_info) = self.tcx.mir_generator_witnesses(generator_did)
{
let generator_info = &self.tcx.mir_generator_witnesses(generator_did);
debug!(?generator_info);
'find_source: for (variant, source_info) in
generator_info.variant_fields.iter().zip(&generator_info.variant_source_info)
{