@@ -375,7 +375,7 @@ struct Builder<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
375
375
var_indices : HirIdMap < LocalsForNode > ,
376
376
local_decls : IndexVec < Local , LocalDecl < ' tcx > > ,
377
377
canonical_user_type_annotations : ty:: CanonicalUserTypeAnnotations < ' tcx > ,
378
- upvar_decls : Vec < UpvarDecl > ,
378
+ __upvar_debuginfo_codegen_only_do_not_use : Vec < UpvarDebuginfo > ,
379
379
upvar_mutbls : Vec < Mutability > ,
380
380
unit_temp : Option < Place < ' tcx > > ,
381
381
@@ -631,7 +631,7 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
631
631
// closure and we stored in a map called upvar_list in TypeckTables indexed
632
632
// with the closure's DefId. Here, we run through that vec of UpvarIds for
633
633
// 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
635
635
. upvar_list
636
636
. get ( & fn_def_id)
637
637
. into_iter ( )
@@ -644,14 +644,14 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
644
644
ty:: UpvarCapture :: ByValue => false ,
645
645
ty:: UpvarCapture :: ByRef ( ..) => true ,
646
646
} ;
647
- let mut decl = UpvarDecl {
647
+ let mut debuginfo = UpvarDebuginfo {
648
648
debug_name : keywords:: Invalid . name ( ) ,
649
649
by_ref,
650
650
} ;
651
651
let mut mutability = Mutability :: Not ;
652
652
if let Some ( Node :: Binding ( pat) ) = tcx_hir. find ( var_node_id) {
653
653
if let hir:: PatKind :: Binding ( _, _, ident, _) = pat. node {
654
- decl . debug_name = ident. name ;
654
+ debuginfo . debug_name = ident. name ;
655
655
if let Some ( & bm) = hir. tables . pat_binding_modes ( ) . get ( pat. hir_id ) {
656
656
if bm == ty:: BindByValue ( hir:: MutMutable ) {
657
657
mutability = Mutability :: Mut ;
@@ -664,7 +664,7 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
664
664
}
665
665
}
666
666
upvar_mutbls. push ( mutability) ;
667
- decl
667
+ debuginfo
668
668
} )
669
669
. collect ( ) ;
670
670
@@ -674,7 +674,7 @@ fn construct_fn<'a, 'gcx, 'tcx, A>(hir: Cx<'a, 'gcx, 'tcx>,
674
674
safety,
675
675
return_ty,
676
676
return_ty_span,
677
- upvar_decls ,
677
+ upvar_debuginfo ,
678
678
upvar_mutbls) ;
679
679
680
680
let call_site_scope = region:: Scope {
@@ -778,7 +778,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
778
778
safety : Safety ,
779
779
return_ty : Ty < ' tcx > ,
780
780
return_span : Span ,
781
- upvar_decls : Vec < UpvarDecl > ,
781
+ __upvar_debuginfo_codegen_only_do_not_use : Vec < UpvarDebuginfo > ,
782
782
upvar_mutbls : Vec < Mutability > )
783
783
-> Builder < ' a , ' gcx , ' tcx > {
784
784
let lint_level = LintLevel :: Explicit ( hir. root_lint_level ) ;
@@ -801,7 +801,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
801
801
1 ,
802
802
) ,
803
803
canonical_user_type_annotations : IndexVec :: new ( ) ,
804
- upvar_decls ,
804
+ __upvar_debuginfo_codegen_only_do_not_use ,
805
805
upvar_mutbls,
806
806
var_indices : Default :: default ( ) ,
807
807
unit_temp : None ,
@@ -837,7 +837,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
837
837
self . local_decls ,
838
838
self . canonical_user_type_annotations ,
839
839
self . arg_count ,
840
- self . upvar_decls ,
840
+ self . __upvar_debuginfo_codegen_only_do_not_use ,
841
841
self . fn_span ,
842
842
self . hir . control_flow_destroyed ( ) ,
843
843
)
0 commit comments