@@ -53,7 +53,7 @@ pub enum Node<'hir> {
53
53
NodeStmt ( & ' hir Stmt ) ,
54
54
NodeTy ( & ' hir Ty ) ,
55
55
NodeTraitRef ( & ' hir TraitRef ) ,
56
- NodeLocal ( & ' hir Pat ) ,
56
+ NodeBinding ( & ' hir Pat ) ,
57
57
NodePat ( & ' hir Pat ) ,
58
58
NodeBlock ( & ' hir Block ) ,
59
59
@@ -83,7 +83,7 @@ enum MapEntry<'hir> {
83
83
EntryStmt ( NodeId , & ' hir Stmt ) ,
84
84
EntryTy ( NodeId , & ' hir Ty ) ,
85
85
EntryTraitRef ( NodeId , & ' hir TraitRef ) ,
86
- EntryLocal ( NodeId , & ' hir Pat ) ,
86
+ EntryBinding ( NodeId , & ' hir Pat ) ,
87
87
EntryPat ( NodeId , & ' hir Pat ) ,
88
88
EntryBlock ( NodeId , & ' hir Block ) ,
89
89
EntryStructCtor ( NodeId , & ' hir VariantData ) ,
@@ -114,7 +114,7 @@ impl<'hir> MapEntry<'hir> {
114
114
NodeStmt ( n) => EntryStmt ( p, n) ,
115
115
NodeTy ( n) => EntryTy ( p, n) ,
116
116
NodeTraitRef ( n) => EntryTraitRef ( p, n) ,
117
- NodeLocal ( n) => EntryLocal ( p, n) ,
117
+ NodeBinding ( n) => EntryBinding ( p, n) ,
118
118
NodePat ( n) => EntryPat ( p, n) ,
119
119
NodeBlock ( n) => EntryBlock ( p, n) ,
120
120
NodeStructCtor ( n) => EntryStructCtor ( p, n) ,
@@ -136,7 +136,7 @@ impl<'hir> MapEntry<'hir> {
136
136
EntryStmt ( id, _) => id,
137
137
EntryTy ( id, _) => id,
138
138
EntryTraitRef ( id, _) => id,
139
- EntryLocal ( id, _) => id,
139
+ EntryBinding ( id, _) => id,
140
140
EntryPat ( id, _) => id,
141
141
EntryBlock ( id, _) => id,
142
142
EntryStructCtor ( id, _) => id,
@@ -161,7 +161,7 @@ impl<'hir> MapEntry<'hir> {
161
161
EntryStmt ( _, n) => NodeStmt ( n) ,
162
162
EntryTy ( _, n) => NodeTy ( n) ,
163
163
EntryTraitRef ( _, n) => NodeTraitRef ( n) ,
164
- EntryLocal ( _, n) => NodeLocal ( n) ,
164
+ EntryBinding ( _, n) => NodeBinding ( n) ,
165
165
EntryPat ( _, n) => NodePat ( n) ,
166
166
EntryBlock ( _, n) => NodeBlock ( n) ,
167
167
EntryStructCtor ( _, n) => NodeStructCtor ( n) ,
@@ -319,7 +319,7 @@ impl<'hir> Map<'hir> {
319
319
EntryStmt ( p, _) |
320
320
EntryTy ( p, _) |
321
321
EntryTraitRef ( p, _) |
322
- EntryLocal ( p, _) |
322
+ EntryBinding ( p, _) |
323
323
EntryPat ( p, _) |
324
324
EntryBlock ( p, _) |
325
325
EntryStructCtor ( p, _) |
@@ -589,7 +589,7 @@ impl<'hir> Map<'hir> {
589
589
/// immediate parent is an item or a closure.
590
590
pub fn is_argument ( & self , id : NodeId ) -> bool {
591
591
match self . find ( id) {
592
- Some ( NodeLocal ( _) ) => ( ) ,
592
+ Some ( NodeBinding ( _) ) => ( ) ,
593
593
_ => return false ,
594
594
}
595
595
match self . find ( self . get_parent_node ( id) ) {
@@ -856,7 +856,7 @@ impl<'hir> Map<'hir> {
856
856
NodeField ( f) => f. name ,
857
857
NodeLifetime ( lt) => lt. name ,
858
858
NodeTyParam ( tp) => tp. name ,
859
- NodeLocal ( & Pat { node : PatKind :: Binding ( _, _, l, _) , .. } ) => l. node ,
859
+ NodeBinding ( & Pat { node : PatKind :: Binding ( _, _, l, _) , .. } ) => l. node ,
860
860
NodeStructCtor ( _) => self . name ( self . get_parent ( id) ) ,
861
861
_ => bug ! ( "no name for {}" , self . node_to_string( id) )
862
862
}
@@ -915,7 +915,7 @@ impl<'hir> Map<'hir> {
915
915
Some ( EntryStmt ( _, stmt) ) => stmt. span ,
916
916
Some ( EntryTy ( _, ty) ) => ty. span ,
917
917
Some ( EntryTraitRef ( _, tr) ) => tr. path . span ,
918
- Some ( EntryLocal ( _, pat) ) => pat. span ,
918
+ Some ( EntryBinding ( _, pat) ) => pat. span ,
919
919
Some ( EntryPat ( _, pat) ) => pat. span ,
920
920
Some ( EntryBlock ( _, block) ) => block. span ,
921
921
Some ( EntryStructCtor ( _, _) ) => self . expect_item ( self . get_parent ( id) ) . span ,
@@ -1112,7 +1112,7 @@ impl<'a> print::State<'a> {
1112
1112
NodeStmt ( a) => self . print_stmt ( & a) ,
1113
1113
NodeTy ( a) => self . print_type ( & a) ,
1114
1114
NodeTraitRef ( a) => self . print_trait_ref ( & a) ,
1115
- NodeLocal ( a) |
1115
+ NodeBinding ( a) |
1116
1116
NodePat ( a) => self . print_pat ( & a) ,
1117
1117
NodeBlock ( a) => {
1118
1118
use syntax:: print:: pprust:: PrintState ;
@@ -1223,7 +1223,7 @@ fn node_id_to_string(map: &Map, id: NodeId, include_id: bool) -> String {
1223
1223
Some ( NodeTraitRef ( _) ) => {
1224
1224
format ! ( "trait_ref {}{}" , map. node_to_pretty_string( id) , id_str)
1225
1225
}
1226
- Some ( NodeLocal ( _) ) => {
1226
+ Some ( NodeBinding ( _) ) => {
1227
1227
format ! ( "local {}{}" , map. node_to_pretty_string( id) , id_str)
1228
1228
}
1229
1229
Some ( NodePat ( _) ) => {
0 commit comments