@@ -75,10 +75,10 @@ pub enum Code<'a> {
7575}
7676
7777impl < ' a > Code < ' a > {
78- pub fn id ( & self ) -> NodeId {
78+ pub fn id ( & self ) -> ast :: HirId {
7979 match * self {
8080 Code :: FnLike ( node) => node. id ( ) ,
81- Code :: Expr ( block) => block. id ,
81+ Code :: Expr ( block) => block. hir_id ,
8282 }
8383 }
8484
@@ -104,7 +104,7 @@ struct ItemFnParts<'a> {
104104 vis : & ' a ast:: Visibility ,
105105 generics : & ' a ast:: Generics ,
106106 body : ast:: BodyId ,
107- id : NodeId ,
107+ id : ast :: HirId ,
108108 span : Span ,
109109 attrs : & ' a [ Attribute ] ,
110110}
@@ -114,13 +114,13 @@ struct ItemFnParts<'a> {
114114struct ClosureParts < ' a > {
115115 decl : & ' a FnDecl ,
116116 body : ast:: BodyId ,
117- id : NodeId ,
117+ id : ast :: HirId ,
118118 span : Span ,
119119 attrs : & ' a [ Attribute ] ,
120120}
121121
122122impl < ' a > ClosureParts < ' a > {
123- fn new ( d : & ' a FnDecl , b : ast:: BodyId , id : NodeId , s : Span , attrs : & ' a [ Attribute ] ) -> Self {
123+ fn new ( d : & ' a FnDecl , b : ast:: BodyId , id : ast :: HirId , s : Span , attrs : & ' a [ Attribute ] ) -> Self {
124124 ClosureParts {
125125 decl : d,
126126 body : b,
@@ -168,7 +168,7 @@ impl<'a> FnLikeNode<'a> {
168168 |c : ClosureParts < ' _ > | c. span )
169169 }
170170
171- pub fn id ( self ) -> NodeId {
171+ pub fn id ( self ) -> ast :: HirId {
172172 self . handle ( |i : ItemFnParts < ' _ > | i. id ,
173173 |id, _, _: & ' a ast:: MethodSig , _, _, _, _| id,
174174 |c : ClosureParts < ' _ > | c. id )
@@ -213,7 +213,7 @@ impl<'a> FnLikeNode<'a> {
213213
214214 fn handle < A , I , M , C > ( self , item_fn : I , method : M , closure : C ) -> A where
215215 I : FnOnce ( ItemFnParts < ' a > ) -> A ,
216- M : FnOnce ( NodeId ,
216+ M : FnOnce ( ast :: HirId ,
217217 Ident ,
218218 & ' a ast:: MethodSig ,
219219 Option < & ' a ast:: Visibility > ,
@@ -227,7 +227,7 @@ impl<'a> FnLikeNode<'a> {
227227 map:: Node :: Item ( i) => match i. node {
228228 ast:: ItemKind :: Fn ( ref decl, header, ref generics, block) =>
229229 item_fn ( ItemFnParts {
230- id : i. id ,
230+ id : i. hir_id ,
231231 ident : i. ident ,
232232 decl : & decl,
233233 body : block,
@@ -241,21 +241,21 @@ impl<'a> FnLikeNode<'a> {
241241 } ,
242242 map:: Node :: TraitItem ( ti) => match ti. node {
243243 ast:: TraitItemKind :: Method ( ref sig, ast:: TraitMethod :: Provided ( body) ) => {
244- method ( ti. id , ti. ident , sig, None , body, ti. span , & ti. attrs )
244+ method ( ti. hir_id , ti. ident , sig, None , body, ti. span , & ti. attrs )
245245 }
246246 _ => bug ! ( "trait method FnLikeNode that is not fn-like" ) ,
247247 } ,
248248 map:: Node :: ImplItem ( ii) => {
249249 match ii. node {
250250 ast:: ImplItemKind :: Method ( ref sig, body) => {
251- method ( ii. id , ii. ident , sig, Some ( & ii. vis ) , body, ii. span , & ii. attrs )
251+ method ( ii. hir_id , ii. ident , sig, Some ( & ii. vis ) , body, ii. span , & ii. attrs )
252252 }
253253 _ => bug ! ( "impl method FnLikeNode that is not fn-like" )
254254 }
255255 } ,
256256 map:: Node :: Expr ( e) => match e. node {
257257 ast:: ExprKind :: Closure ( _, ref decl, block, _fn_decl_span, _gen) =>
258- closure ( ClosureParts :: new ( & decl, block, e. id , e. span , & e. attrs ) ) ,
258+ closure ( ClosureParts :: new ( & decl, block, e. hir_id , e. span , & e. attrs ) ) ,
259259 _ => bug ! ( "expr FnLikeNode that is not fn-like" ) ,
260260 } ,
261261 _ => bug ! ( "other FnLikeNode that is not fn-like" ) ,
0 commit comments