Open
Description
fn foo() {
let _ = 3;;;;
}
Given the above example, the rustc parser used to silently drop the redundant semicolons (;;;
) from the AST. However, recently the parse has changed how it treats the redundant semicolons - they are now parsed as a semicolon statement with an empty tuple:
Stmt {
node: StmtKind::Semi(Expr {
node: ExprKind::Tup(vec![]),
..
}),
..
}
Found this while updating rustc-ap-syntax to 562.0.0 (which is built from the commit fc8765d) in rustfmt.