We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1c519d commit de6826bCopy full SHA for de6826b
1 file changed
src/tools/rust-analyzer/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