Handle error body when in generator layout
This commit is contained in:
parent
69fef92ab2
commit
f77971e221
8 changed files with 49 additions and 11 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue