We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
expect
let else bug!
1 parent 688e531 commit 626fd4bCopy full SHA for 626fd4b
compiler/rustc_mir_transform/src/coroutine/by_move_body.rs
@@ -145,9 +145,8 @@ impl<'tcx> MirPass<'tcx> for ByMoveBody {
145
.enumerate()
146
{
147
loop {
148
- let Some(&(parent_field_idx, parent_capture)) = parent_captures.peek() else {
149
- bug!("we ran out of parent captures!")
150
- };
+ let &(parent_field_idx, parent_capture) =
+ parent_captures.peek().expect("we ran out of parent captures!");
151
// A parent matches a child they share the same prefix of projections.
152
// The child may have more, if it is capturing sub-fields out of
153
// something that is captured by-move in the parent closure.
0 commit comments