Fix double space in pretty printed TryBlock

This commit is contained in:
David Tolnay 2021-12-29 11:13:33 -08:00
parent 2b67c30bfe
commit 2f25a4ab30
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 1 additions and 2 deletions

View File

@ -2239,7 +2239,6 @@ impl<'a> State<'a> {
}
ast::ExprKind::TryBlock(ref blk) => {
self.head("try");
self.space();
self.print_block_with_attrs(blk, attrs)
}
ast::ExprKind::Err => {

View File

@ -256,7 +256,7 @@ fn test_expr() {
assert_eq!(stringify_expr!(expr.await), "expr.await");
// ExprKind::TryBlock
assert_eq!(stringify_expr!(try {}), "try {}"); // FIXME
assert_eq!(stringify_expr!(try {}), "try {}");
// ExprKind::Assign
assert_eq!(stringify_expr!(expr = true), "expr = true");