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.
1 parent 3d80678 commit b57e0e2Copy full SHA for b57e0e2
src/matches.rs
@@ -364,7 +364,8 @@ fn rewrite_match_body(
364
shape.indent
365
};
366
367
- let forbid_same_line = has_guard && pats_str.contains('\n') && !is_empty_block;
+ let forbid_same_line =
368
+ (has_guard && pats_str.contains('\n') && !is_empty_block) || !body.attrs.is_empty();
369
370
// Look for comments between `=>` and the start of the body.
371
let arrow_comment = {
0 commit comments