From 2e4376d29c61cb6c470ec836cb341d060aae6074 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Wed, 6 Jun 2018 10:46:49 +0900 Subject: [PATCH] Do not put where clause on a single with multi-lined type --- src/items.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/items.rs b/src/items.rs index cc5825048e4b..321a74df7cc1 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();