File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
librustc_mir/borrow_check Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -940,13 +940,6 @@ impl<'hir> Map<'hir> {
940940 }
941941 }
942942
943- /// Returns the name associated with the given `NodeId`'s AST.
944- pub fn name ( & self , id : NodeId ) -> Name {
945- let hir_id = self . node_to_hir_id ( id) ;
946- self . name_by_hir_id ( hir_id)
947- }
948-
949- // FIXME(@ljedrz): replace the `NodeId` variant.
950943 pub fn name_by_hir_id ( & self , id : HirId ) -> Name {
951944 match self . get_by_hir_id ( id) {
952945 Node :: Item ( i) => i. ident . name ,
Original file line number Diff line number Diff line change @@ -124,14 +124,13 @@ fn do_mir_borrowck<'a, 'tcx>(
124124 . flat_map ( |v| v. values ( ) )
125125 . map ( |upvar_id| {
126126 let var_hir_id = upvar_id. var_path . hir_id ;
127- let var_node_id = tcx. hir ( ) . hir_to_node_id ( var_hir_id) ;
128127 let capture = tables. upvar_capture ( * upvar_id) ;
129128 let by_ref = match capture {
130129 ty:: UpvarCapture :: ByValue => false ,
131130 ty:: UpvarCapture :: ByRef ( ..) => true ,
132131 } ;
133132 let mut upvar = Upvar {
134- name : tcx. hir ( ) . name ( var_node_id ) ,
133+ name : tcx. hir ( ) . name_by_hir_id ( var_hir_id ) ,
135134 var_hir_id,
136135 by_ref,
137136 mutability : Mutability :: Not ,
You can’t perform that action at this time.
0 commit comments