@@ -63,7 +63,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxedLocal {
63
63
) {
64
64
// If the method is an impl for a trait, don't warn.
65
65
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) ;
67
67
68
68
if let Some ( Node :: Item ( item) ) = parent_node {
69
69
if let ItemKind :: Impl ( _, _, _, _, Some ( ..) , _, _) = item. node {
@@ -113,9 +113,9 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
113
113
fn matched_pat ( & mut self , _: & Pat , _: & cmt_ < ' tcx > , _: MatchMode ) { }
114
114
fn consume_pat ( & mut self , consume_pat : & Pat , cmt : & cmt_ < ' tcx > , _: ConsumeMode ) {
115
115
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 ) {
117
117
// 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 ) ) {
119
119
return ;
120
120
}
121
121
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> {
124
124
return ;
125
125
}
126
126
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 ) ) {
128
128
if let StmtKind :: Local ( ref loc) = st. node {
129
129
if let Some ( ref ex) = loc. init {
130
130
if let ExprKind :: Box ( ..) = ex. node {
0 commit comments