Explicitly handle semicolon after the item in statement position

This commit is contained in:
Seiichi Uchida 2018-08-04 09:59:38 +09:00
parent cf13534150
commit d96e3ca604

View File

@ -90,6 +90,8 @@ fn visit_stmt(&mut self, stmt: &ast::Stmt) {
match stmt.node {
ast::StmtKind::Item(ref item) => {
self.visit_item(item);
// Handle potential `;` after the item.
self.format_missing(stmt.span.hi());
}
ast::StmtKind::Local(..) | ast::StmtKind::Expr(..) | ast::StmtKind::Semi(..) => {
if contains_skip(get_attrs_from_stmt(stmt)) {