about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-05-03 16:03:05 -0700
committerTyler Mandry <tmandry@gmail.com>2019-05-03 16:03:05 -0700
commit15dbe652ffa260fda162be3fa8e7aa075884c412 (patch)
tree290288e68dad20465fb2f3737d1368c31e458c6c /src/librustc_codegen_ssa
parentf7c2f2475a0adc2bf025a7a845fee61ff1468350 (diff)
downloadrust-15dbe652ffa260fda162be3fa8e7aa075884c412.tar.gz
rust-15dbe652ffa260fda162be3fa8e7aa075884c412.zip
Split out debuginfo from type info in MIR GeneratorLayout
Diffstat (limited to 'src/librustc_codegen_ssa')
-rw-r--r--src/librustc_codegen_ssa/mir/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustc_codegen_ssa/mir/mod.rs b/src/librustc_codegen_ssa/mir/mod.rs
index d524ec05462..fcf099235aa 100644
--- a/src/librustc_codegen_ssa/mir/mod.rs
+++ b/src/librustc_codegen_ssa/mir/mod.rs
@@ -663,12 +663,14 @@ fn arg_local_refs<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>>(
                     generator_layout.variant_fields.iter()
                         .zip(state_tys)
                         .enumerate()
-                        .flat_map(move |(variant_idx, (decls, tys))| {
+                        .flat_map(move |(variant_idx, (fields, tys))| {
                             let variant_idx = Some(VariantIdx::from(variant_idx));
-                            decls.iter()
+                            fields.iter()
                                 .zip(tys)
                                 .enumerate()
-                                .filter_map(move |(i, (decl, ty))| {
+                                .filter_map(move |(i, (field, ty))| {
+                                    let decl = &generator_layout.
+                                        __local_debuginfo_codegen_only_do_not_use[*field];
                                     if let Some(name) = decl.name {
                                         let ty = fx.monomorphize(&ty);
                                         let (var_scope, var_span) = fx.debug_loc(mir::SourceInfo {