Box generator-related Body fields

This commit is contained in:
Dániel Buga
2021-01-17 13:27:05 +01:00
parent 3b150b7a8f
commit b97eb23cd0
14 changed files with 89 additions and 54 deletions

View File

@@ -131,7 +131,7 @@ fn dump_matched_mir_node<'tcx, F>(
Some(promoted) => write!(file, "::{:?}`", promoted)?,
}
writeln!(file, " {} {}", disambiguator, pass_name)?;
if let Some(ref layout) = body.generator_layout {
if let Some(ref layout) = body.generator_layout() {
writeln!(file, "/* generator_layout = {:#?} */", layout)?;
}
writeln!(file)?;
@@ -956,7 +956,7 @@ fn write_mir_sig(tcx: TyCtxt<'_>, body: &Body<'_>, w: &mut dyn Write) -> io::Res
write!(w, ": {} =", body.return_ty())?;
}
if let Some(yield_ty) = body.yield_ty {
if let Some(yield_ty) = body.yield_ty() {
writeln!(w)?;
writeln!(w, "yields {}", yield_ty)?;
}