We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6096823 + 6f57d63 commit 85133eaCopy full SHA for 85133ea
src/expr.rs
@@ -3464,7 +3464,9 @@ pub(crate) mod printing {
3464
self.inputs.to_tokens(tokens);
3465
self.or2_token.to_tokens(tokens);
3466
self.output.to_tokens(tokens);
3467
- if matches!(self.output, ReturnType::Default) || matches!(*self.body, Expr::Block(_)) {
+ if matches!(self.output, ReturnType::Default)
3468
+ || matches!(&*self.body, Expr::Block(body) if body.attrs.is_empty() && body.label.is_none())
3469
+ {
3470
self.body.to_tokens(tokens);
3471
} else {
3472
token::Brace::default().surround(tokens, |tokens| {
0 commit comments