@@ -375,7 +375,7 @@ struct Builder<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
375375 var_indices : HirIdMap < LocalsForNode > ,
376376 local_decls : IndexVec < Local , LocalDecl < ' tcx > > ,
377377 canonical_user_type_annotations : ty:: CanonicalUserTypeAnnotations < ' tcx > ,
378- upvar_decls : Vec < UpvarDecl > ,
378+ __upvar_debuginfo_codegen_only_do_not_use : Vec < UpvarDebuginfo > ,
379379 upvar_mutbls : Vec < Mutability > ,
380380 unit_temp : Option < Place < ' tcx > > ,
381381
@@ -631,7 +631,7 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
631631 // closure and we stored in a map called upvar_list in TypeckTables indexed
632632 // with the closure's DefId. Here, we run through that vec of UpvarIds for
633633 // the given closure and use the necessary information to create UpvarDecl.
634- let upvar_decls : Vec < _ > = hir_tables
634+ let upvar_debuginfo : Vec < _ > = hir_tables
635635 . upvar_list
636636 . get ( & fn_def_id)
637637 . into_iter ( )
@@ -644,14 +644,14 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
644644 ty:: UpvarCapture :: ByValue => false ,
645645 ty:: UpvarCapture :: ByRef ( ..) => true ,
646646 } ;
647- let mut decl = UpvarDecl {
647+ let mut debuginfo = UpvarDebuginfo {
648648 debug_name : keywords:: Invalid . name ( ) ,
649649 by_ref,
650650 } ;
651651 let mut mutability = Mutability :: Not ;
652652 if let Some ( Node :: Binding ( pat) ) = tcx_hir. find ( var_node_id) {
653653 if let hir:: PatKind :: Binding ( _, _, ident, _) = pat. node {
654- decl . debug_name = ident. name ;
654+ debuginfo . debug_name = ident. name ;
655655 if let Some ( & bm) = hir. tables . pat_binding_modes ( ) . get ( pat. hir_id ) {
656656 if bm == ty:: BindByValue ( hir:: MutMutable ) {
657657 mutability = Mutability :: Mut ;
@@ -664,7 +664,7 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
664664 }
665665 }
666666 upvar_mutbls. push ( mutability) ;
667- decl
667+ debuginfo
668668 } )
669669 . collect ( ) ;
670670
@@ -674,7 +674,7 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
674674 safety,
675675 return_ty,
676676 return_ty_span,
677- upvar_decls ,
677+ upvar_debuginfo ,
678678 upvar_mutbls) ;
679679
680680 let call_site_scope = region:: Scope {
@@ -778,7 +778,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
778778 safety : Safety ,
779779 return_ty : Ty < ' tcx > ,
780780 return_span : Span ,
781- upvar_decls : Vec < UpvarDecl > ,
781+ __upvar_debuginfo_codegen_only_do_not_use : Vec < UpvarDebuginfo > ,
782782 upvar_mutbls : Vec < Mutability > )
783783 -> Builder < ' a , ' gcx , ' tcx > {
784784 let lint_level = LintLevel :: Explicit ( hir. root_lint_level ) ;
@@ -801,7 +801,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
801801 1 ,
802802 ) ,
803803 canonical_user_type_annotations : IndexVec :: new ( ) ,
804- upvar_decls ,
804+ __upvar_debuginfo_codegen_only_do_not_use ,
805805 upvar_mutbls,
806806 var_indices : Default :: default ( ) ,
807807 unit_temp : None ,
@@ -837,7 +837,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
837837 self . local_decls ,
838838 self . canonical_user_type_annotations ,
839839 self . arg_count ,
840- self . upvar_decls ,
840+ self . __upvar_debuginfo_codegen_only_do_not_use ,
841841 self . fn_span ,
842842 self . hir . control_flow_destroyed ( ) ,
843843 )
0 commit comments