prefer expect
over let else bug!
This commit is contained in:
parent
688e531925
commit
626fd4b258
1 changed files with 2 additions and 3 deletions
|
@ -145,9 +145,8 @@ impl<'tcx> MirPass<'tcx> for ByMoveBody {
|
||||||
.enumerate()
|
.enumerate()
|
||||||
{
|
{
|
||||||
loop {
|
loop {
|
||||||
let Some(&(parent_field_idx, parent_capture)) = parent_captures.peek() else {
|
let &(parent_field_idx, parent_capture) =
|
||||||
bug!("we ran out of parent captures!")
|
parent_captures.peek().expect("we ran out of parent captures!");
|
||||||
};
|
|
||||||
// A parent matches a child they share the same prefix of projections.
|
// A parent matches a child they share the same prefix of projections.
|
||||||
// The child may have more, if it is capturing sub-fields out of
|
// The child may have more, if it is capturing sub-fields out of
|
||||||
// something that is captured by-move in the parent closure.
|
// something that is captured by-move in the parent closure.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue