@@ -47,21 +47,18 @@ fn check_fn_for_unconditional_recursion<'tcx>(
47
47
// Converging successors without unwind paths.
48
48
let terminator = body[ bb] . terminator ( ) ;
49
49
let relevant_successors = match & terminator. kind {
50
- TerminatorKind :: Call { destination : Some ( ( _, dest) ) , .. } => {
51
- Some ( dest) . into_iter ( ) . chain ( & [ ] )
52
- }
53
- TerminatorKind :: Call { destination : None , .. } => None . into_iter ( ) . chain ( & [ ] ) ,
50
+ TerminatorKind :: Call { destination : None , .. }
51
+ | TerminatorKind :: Yield { .. }
52
+ | TerminatorKind :: GeneratorDrop => None . into_iter ( ) . chain ( & [ ] ) ,
54
53
TerminatorKind :: SwitchInt { targets, .. } => None . into_iter ( ) . chain ( targets) ,
55
54
TerminatorKind :: Goto { target }
56
55
| TerminatorKind :: Drop { target, .. }
57
56
| TerminatorKind :: DropAndReplace { target, .. }
58
- | TerminatorKind :: Assert { target, .. } => Some ( target) . into_iter ( ) . chain ( & [ ] ) ,
59
- TerminatorKind :: Yield { .. } | TerminatorKind :: GeneratorDrop => {
60
- None . into_iter ( ) . chain ( & [ ] )
61
- }
62
- TerminatorKind :: FalseEdges { real_target, .. }
63
- | TerminatorKind :: FalseUnwind { real_target, .. } => {
64
- Some ( real_target) . into_iter ( ) . chain ( & [ ] )
57
+ | TerminatorKind :: Assert { target, .. }
58
+ | TerminatorKind :: FalseEdges { real_target : target, .. }
59
+ | TerminatorKind :: FalseUnwind { real_target : target, .. }
60
+ | TerminatorKind :: Call { destination : Some ( ( _, target) ) , .. } => {
61
+ Some ( target) . into_iter ( ) . chain ( & [ ] )
65
62
}
66
63
TerminatorKind :: Resume
67
64
| TerminatorKind :: Abort
0 commit comments