This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ fn check_fn_for_unconditional_recursion<'tcx>(
2929) {
3030 let self_calls = find_blocks_calling_self ( tcx, & body, def_id) ;
3131
32- // Stores a list of `Span`s for every basic block. Those are the spans of `Call` terminators
33- // where we know that one of them will definitely be reached.
32+ // Stores a list of `Span`s for every basic block. Those are the spans of self-calls where we
33+ // know that one of them will definitely be reached. If the list is empty, the block either
34+ // wasn't processed yet or will not always go to a self-call.
3435 let mut results = IndexVec :: from_elem_n ( vec ! [ ] , body. basic_blocks ( ) . len ( ) ) ;
3536
3637 // We start the analysis at the self calls and work backwards.
@@ -51,7 +52,7 @@ fn check_fn_for_unconditional_recursion<'tcx>(
5152 // If *all* successors of `bb` lead to a self-call, emit notes at all of their
5253 // locations.
5354
54- // Converging successors without unwind paths .
55+ // Determine all "relevant" successors. We ignore successors only reached via unwinding .
5556 let terminator = body[ bb] . terminator ( ) ;
5657 let relevant_successors = match & terminator. kind {
5758 TerminatorKind :: Call { destination : None , .. }
You can’t perform that action at this time.
0 commit comments