Better error messages.

This commit is contained in:
Stephen Chung
2021-12-30 12:19:41 +08:00
parent 1fd242ed2c
commit 64bf2eef5c
9 changed files with 74 additions and 64 deletions

View File

@@ -199,7 +199,7 @@ fn optimize_stmt_block(
let stmt = mem::take(&mut second[0]);
let mut stmts = match stmt {
Stmt::Block(block, _) => block,
_ => unreachable!("Stmt::Block expected but gets {:?}", stmt),
stmt => unreachable!("Stmt::Block expected but gets {:?}", stmt),
};
statements = first
.iter_mut()