1
Fork 0

Pretty print empty blocks as {}

This commit is contained in:
David Tolnay 2021-12-01 11:45:14 -08:00
parent f04a2f4b8e
commit b516a8c5cb
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
63 changed files with 182 additions and 164 deletions

View file

@ -2171,7 +2171,7 @@ impl<'a> State<'a> {
match decl.output {
hir::FnRetTy::Return(ref ty) => {
self.print_type(&ty);
self.maybe_print_comment(ty.span.lo())
self.maybe_print_comment(ty.span.lo());
}
hir::FnRetTy::DefaultReturn(..) => unreachable!(),
}
@ -2365,7 +2365,7 @@ impl<'a> State<'a> {
self.end();
if let hir::FnRetTy::Return(ref output) = decl.output {
self.maybe_print_comment(output.span.lo())
self.maybe_print_comment(output.span.lo());
}
}