+
+ let forbid_same_line = has_guard && pats_str.contains('\n') && !is_empty_block;
+
+ // Look for comments between `=>` and the start of the body.
+ let arrow_comment = {
+ let arrow_snippet = context.snippet(arrow_span).trim();
+ let arrow_index = arrow_snippet.find("=>").unwrap();
+ // 2 = `=>`
+ let comment_str = arrow_snippet[arrow_index + 2..].trim();
+ if comment_str.is_empty() {
+ String::new()
+ } else {
+ rewrite_comment(comment_str, false, shape, &context.config)?
+ }
+ };
+