From 59ebde26f795c41665637d6d0a939a6711fe638a Mon Sep 17 00:00:00 2001 From: topecongiro Date: Tue, 21 Nov 2017 08:52:43 +0900 Subject: [PATCH] Cargo fmt --- src/items.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/items.rs b/src/items.rs index 3fe82f48ea5..a202a17d34f 100644 --- a/src/items.rs +++ b/src/items.rs @@ -955,7 +955,9 @@ pub fn format_trait(context: &RewriteContext, item: &ast::Item, offset: Indent) // FIXME(#2055): rustfmt fails to format when there are comments between trait bounds. if !type_param_bounds.is_empty() { - let ident_hi = context.codemap.span_after(item.span, &format!("{}", item.ident)); + let ident_hi = context + .codemap + .span_after(item.span, &format!("{}", item.ident)); let bound_hi = type_param_bounds.last().unwrap().span().hi(); let snippet = context.snippet(mk_sp(ident_hi, bound_hi)); if contains_comment(&snippet) {