@@ -383,7 +383,7 @@ fn visit_fn(ir: &mut IrMaps,
383
383
& * arg. pat ,
384
384
|_bm, arg_id, _x, path1| {
385
385
debug ! ( "adding argument {}" , arg_id) ;
386
- let name = path1. node . name ;
386
+ let name = path1. node ;
387
387
fn_maps. add_variable ( Arg ( arg_id, name) ) ;
388
388
} )
389
389
} ;
@@ -416,7 +416,7 @@ fn visit_fn(ir: &mut IrMaps,
416
416
fn visit_local ( ir : & mut IrMaps , local : & hir:: Local ) {
417
417
pat_util:: pat_bindings ( & ir. tcx . def_map , & * local. pat , |_, p_id, sp, path1| {
418
418
debug ! ( "adding local variable {}" , p_id) ;
419
- let name = path1. node . name ;
419
+ let name = path1. node ;
420
420
ir. add_live_node_for_node ( p_id, VarDefNode ( sp) ) ;
421
421
ir. add_variable ( Local ( LocalInfo {
422
422
id : p_id,
@@ -431,7 +431,7 @@ fn visit_arm(ir: &mut IrMaps, arm: &hir::Arm) {
431
431
pat_util:: pat_bindings ( & ir. tcx . def_map , & * * pat, |bm, p_id, sp, path1| {
432
432
debug ! ( "adding local variable {} from match with bm {:?}" ,
433
433
p_id, bm) ;
434
- let name = path1. node . name ;
434
+ let name = path1. node ;
435
435
ir. add_live_node_for_node ( p_id, VarDefNode ( sp) ) ;
436
436
ir. add_variable ( Local ( LocalInfo {
437
437
id : p_id,
@@ -688,7 +688,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
688
688
}
689
689
690
690
fn find_loop_scope ( & self ,
691
- opt_label : Option < ast:: Ident > ,
691
+ opt_label : Option < ast:: Name > ,
692
692
id : NodeId ,
693
693
sp : Span )
694
694
-> NodeId {
@@ -1049,7 +1049,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
1049
1049
1050
1050
hir:: ExprBreak ( opt_label) => {
1051
1051
// Find which label this break jumps to
1052
- let sc = self . find_loop_scope ( opt_label. map ( |l| l. node ) , expr. id , expr. span ) ;
1052
+ let sc = self . find_loop_scope ( opt_label. map ( |l| l. node . name ) , expr. id , expr. span ) ;
1053
1053
1054
1054
// Now that we know the label we're going to,
1055
1055
// look it up in the break loop nodes table
@@ -1063,7 +1063,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
1063
1063
1064
1064
hir:: ExprAgain ( opt_label) => {
1065
1065
// Find which label this expr continues to
1066
- let sc = self . find_loop_scope ( opt_label. map ( |l| l. node ) , expr. id , expr. span ) ;
1066
+ let sc = self . find_loop_scope ( opt_label. map ( |l| l. node . name ) , expr. id , expr. span ) ;
1067
1067
1068
1068
// Now that we know the label we're going to,
1069
1069
// look it up in the continue loop nodes table
@@ -1555,8 +1555,8 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
1555
1555
|_bm, p_id, sp, path1| {
1556
1556
let var = self . variable ( p_id, sp) ;
1557
1557
// Ignore unused self.
1558
- let ident = path1. node ;
1559
- if ident . name != special_idents:: self_. name {
1558
+ let name = path1. node ;
1559
+ if name != special_idents:: self_. name {
1560
1560
self . warn_about_unused ( sp, p_id, entry_ln, var) ;
1561
1561
}
1562
1562
} )
0 commit comments