We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7687101 commit 2ebeeefCopy full SHA for 2ebeeef
1 file changed
crates/span/src/ast_id.rs
@@ -678,9 +678,10 @@ impl AstIdMap {
678
}
679
680
syntax::WalkEvent::Leave(node) => {
681
- if cfg!(debug_assertions) && ast::BlockExpr::can_cast(node.kind()) {
682
- assert_eq!(
683
- blocks.pop().map(|it| it.0),
+ if ast::BlockExpr::can_cast(node.kind()) {
+ let block = blocks.pop();
+ debug_assert_eq!(
684
+ block.map(|it| it.0),
685
Some(node),
686
"left a BlockExpr we never entered"
687
);
0 commit comments