File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,10 @@ pub(super) fn check<'tcx>(
59
59
} ;
60
60
61
61
let map = cx. tcx . hir ( ) ;
62
- let body = map. body_owned_by ( map. enclosing_body_owner ( expr. hir_id ) ) ;
63
- reference_visitor. visit_body ( body) ;
62
+ let body = map. body ( map. body_owned_by ( map. enclosing_body_owner ( expr. hir_id ) ) ) ;
64
63
65
- if reference_visitor. visit_body ( body) ; . is_break ( ) {
64
+ // Visit the body, and return if we've found a reference
65
+ if reference_visitor. visit_body ( body) . is_break ( ) {
66
66
return ;
67
67
} ;
68
68
}
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ where
293
293
}
294
294
295
295
fn visit_expr ( & mut self , expr : & ' tcx Expr < ' tcx > ) -> ControlFlow < ( ) > {
296
- walk_expr ( self , expr) ;
296
+ walk_expr ( self , expr) ? ;
297
297
298
298
if let ExprKind :: Call ( f, _) = expr. kind
299
299
&& let ExprKind :: Path ( qpath) = f. kind
You can’t perform that action at this time.
0 commit comments