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

@@ -2998,7 +2998,7 @@ impl<'tcx> TyCtxt<'tcx> {
/// Returns layout of a generator. Layout might be unavailable if the
/// generator is tainted by errors.
pub fn generator_layout(self, def_id: DefId) -> Option<&'tcx GeneratorLayout<'tcx>> {
self.optimized_mir(def_id).generator_layout.as_ref()
self.optimized_mir(def_id).generator_layout()
}
/// Given the `DefId` of an impl, returns the `DefId` of the trait it implements.