diff --git a/src/items.rs b/src/items.rs index cc5825048e4..321a74df7cc 100644 --- a/src/items.rs +++ b/src/items.rs @@ -656,6 +656,7 @@ pub fn format_impl( if !contains_comment(&snippet[open_pos..]) && items.is_empty() && generics.where_clause.predicates.len() == 1 + && !result.contains('\n') { option.suppress_comma(); option.snuggle();