@@ -63,7 +63,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxedLocal {
6363 ) {
6464 // If the method is an impl for a trait, don't warn.
6565 let parent_id = cx. tcx . hir ( ) . get_parent_item ( hir_id) ;
66- let parent_node = cx. tcx . hir ( ) . find_by_hir_id ( parent_id) ;
66+ let parent_node = cx. tcx . hir ( ) . find ( parent_id) ;
6767
6868 if let Some ( Node :: Item ( item) ) = parent_node {
6969 if let ItemKind :: Impl ( _, _, _, _, Some ( ..) , _, _) = item. node {
@@ -113,9 +113,9 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
113113 fn matched_pat ( & mut self , _: & Pat , _: & cmt_ < ' tcx > , _: MatchMode ) { }
114114 fn consume_pat ( & mut self , consume_pat : & Pat , cmt : & cmt_ < ' tcx > , _: ConsumeMode ) {
115115 let map = & self . cx . tcx . hir ( ) ;
116- if map. is_argument ( map . hir_to_node_id ( consume_pat. hir_id ) ) {
116+ if map. is_argument ( consume_pat. hir_id ) {
117117 // Skip closure arguments
118- if let Some ( Node :: Expr ( ..) ) = map. find_by_hir_id ( map. get_parent_node_by_hir_id ( consume_pat. hir_id ) ) {
118+ if let Some ( Node :: Expr ( ..) ) = map. find ( map. get_parent_node ( consume_pat. hir_id ) ) {
119119 return ;
120120 }
121121 if is_non_trait_box ( cmt. ty ) && !self . is_large_box ( cmt. ty ) {
@@ -124,7 +124,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
124124 return ;
125125 }
126126 if let Categorization :: Rvalue ( ..) = cmt. cat {
127- if let Some ( Node :: Stmt ( st) ) = map. find_by_hir_id ( map. get_parent_node_by_hir_id ( cmt. hir_id ) ) {
127+ if let Some ( Node :: Stmt ( st) ) = map. find ( map. get_parent_node ( cmt. hir_id ) ) {
128128 if let StmtKind :: Local ( ref loc) = st. node {
129129 if let Some ( ref ex) = loc. init {
130130 if let ExprKind :: Box ( ..) = ex. node {
0 commit comments