Skip to content

Commit a6bc5d6

Browse files
committed
Use correct budget when rewriting generics of trait
1 parent 061232f commit a6bc5d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ pub fn format_trait(context: &RewriteContext, item: &ast::Item, offset: Indent)
938938

939939
let body_lo = context.codemap.span_after(item.span, "{");
940940

941-
let shape = Shape::indented(offset, context.config);
941+
let shape = Shape::indented(offset, context.config).offset_left(result.len())?;
942942
let generics_str =
943943
rewrite_generics(context, generics, shape, mk_sp(item.span.lo(), body_lo))?;
944944
result.push_str(&generics_str);

0 commit comments

Comments
 (0)