about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-04 00:23:42 +0000
committerbors <bors@rust-lang.org>2021-03-04 00:23:42 +0000
commit6f7673d077add6b9a066e988b1b8b132a8193d6c (patch)
treefbd82fad6d6f9695a47727edd231fc52f9eedce9 /compiler/rustc_codegen_llvm/src
parent1c77a1fa3ca574f2a40056f64d498db8efe0d8a8 (diff)
parentb97eb23cd02d9fb848cac071b02250fbdb0e34c5 (diff)
downloadrust-6f7673d077add6b9a066e988b1b8b132a8193d6c.tar.gz
rust-6f7673d077add6b9a066e988b1b8b132a8193d6c.zip
Auto merge of #81114 - bugadani:generator, r=estebank
Box generator-related Body fields

Might save some memory on functions that aren't generators.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
index 85d1b702399..b2e0a4311a7 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
@@ -1417,7 +1417,7 @@ fn generator_layout_and_saved_local_names(
     def_id: DefId,
 ) -> (&'tcx GeneratorLayout<'tcx>, IndexVec<mir::GeneratorSavedLocal, Option<Symbol>>) {
     let body = tcx.optimized_mir(def_id);
-    let generator_layout = body.generator_layout.as_ref().unwrap();
+    let generator_layout = body.generator_layout().unwrap();
     let mut generator_saved_local_names = IndexVec::from_elem(None, &generator_layout.field_tys);
 
     let state_arg = mir::Local::new(1);