From 941b6b0c0cfde5e253e799c7db9381263ca9cdb8 Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Tue, 20 Dec 2016 11:33:34 -0600 Subject: [PATCH] rustdoc: properly calculate line length for impl where clauses --- src/librustdoc/html/format.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 6dc6e80dae0b8..796a3a93068c8 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -207,7 +207,7 @@ impl<'a> fmt::Display for WhereClause<'a> { if !f.alternate() { clause.push_str(""); let plain = format!("{:#}", self); - if plain.len() > 80 { + if plain.len() + pad > 80 { //break it onto its own line regardless, but make sure method impls and trait //blocks keep their fixed padding (2 and 9, respectively) let padding = if pad > 10 {