We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ce96b1 commit c54301fCopy full SHA for c54301f
compiler/rustc_middle/src/hir/map/mod.rs
@@ -563,6 +563,9 @@ impl<'hir> Map<'hir> {
563
// We verify that indirectly by checking that the previous node is the
564
// current node's body
565
if node.body_id().map(|b| b.hir_id) == prev_hir_id => {
566
+ if let Node::Expr(Expr { kind: ExprKind::Block(_, _), ..}) = self.tcx.hir_node(prev_hir_id.unwrap()) {
567
+ return None;
568
+ }
569
return Some(hir_id)
570
}
571
// Ignore `return`s on the first iteration
0 commit comments