1
Fork 0

Rollup merge of #111533 - clubby789:drop-tracking-error, r=oli-obk

Handle error body in generator layout

Fixes #111468

I feel like making this query return `Option<GeneratorLayout>` might be better but had some issues with that approach
This commit is contained in:
Matthias Krüger 2023-05-16 20:12:16 +02:00 committed by GitHub
commit 426dbcdf92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)
{