File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,6 @@ fn mark_local_terminating_scopes<'tcx>(expr: &'tcx hir::Expr<'tcx>) -> FxHashSet
278278 }
279279 }
280280 impl < ' a , ' b > Visitor < ' a > for LocalAccessResolutionVisitor < ' b > {
281- type Map = intravisit:: ErasedMap < ' a > ;
282- fn nested_visit_map ( & mut self ) -> NestedVisitorMap < Self :: Map > {
283- NestedVisitorMap :: None
284- }
285281 fn visit_expr ( & mut self , expr : & ' a Expr < ' a > ) {
286282 match expr. kind {
287283 hir:: ExprKind :: AddrOf ( ..)
@@ -290,7 +286,8 @@ fn mark_local_terminating_scopes<'tcx>(expr: &'tcx hir::Expr<'tcx>) -> FxHashSet
290286 | hir:: ExprKind :: Index ( ..)
291287 | hir:: ExprKind :: Path ( ..) => self . probe ( expr) ,
292288
293- // We do not probe into other function bodies or blocks.
289+ // We do not probe into other function bodies or blocks,
290+ // neither `if`s and `match`es because they will be covered in deeper visits
294291 hir:: ExprKind :: If ( ..)
295292 | hir:: ExprKind :: Match ( ..)
296293 | hir:: ExprKind :: Block ( ..)
You can’t perform that action at this time.
0 commit comments