Skip to content

Commit cb58de8

Browse files
Apply suggestions from code review
Co-Authored-By: bjorn3 <[email protected]>
1 parent 2cbccce commit cb58de8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_mir/transform/generator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -997,14 +997,14 @@ fn can_return<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) -> bool {
997997
return false;
998998
}
999999

1000-
// If there's no return terminator the function also won't return.
1000+
// If there's a return terminator the function may return.
10011001
for block in body.basic_blocks() {
10021002
if let TerminatorKind::Return = block.terminator().kind {
10031003
return true;
10041004
}
10051005
}
10061006

1007-
// Otherwise we assume that the function may return.
1007+
// Otherwise the function can't return.
10081008
false
10091009
}
10101010

0 commit comments

Comments
 (0)