about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-01-21 15:34:11 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-01-21 15:34:11 +0100
commitcbfc8fe3eb3f54b3ad89b87db75092acbed9926b (patch)
tree3304cf4af313d252170412298bca2e844876166c /src
parentd8801287a34052eb22cc4f2731ddff9a6283d870 (diff)
downloadrust-cbfc8fe3eb3f54b3ad89b87db75092acbed9926b.tar.gz
rust-cbfc8fe3eb3f54b3ad89b87db75092acbed9926b.zip
Force backline on all where in docs
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/format.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index d25c4184f3c..60dae19d876 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -165,7 +165,7 @@ impl<'a> fmt::Display for WhereClause<'a> {
         if f.alternate() {
             clause.push_str(" where ");
         } else {
-            clause.push_str(" <span class='where'>where ");
+            clause.push_str(" <span class='where fmt-newline'>where ");
         }
         for (i, pred) in gens.where_predicates.iter().enumerate() {
             if i > 0 {
@@ -208,10 +208,9 @@ impl<'a> fmt::Display for WhereClause<'a> {
             clause.push_str("</span>");
             let plain = format!("{:#}", self);
             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)
+                // 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 {
-                    clause = clause.replace("class='where'", "class='where fmt-newline'");
                     repeat("&nbsp;").take(8).collect::<String>()
                 } else {
                     repeat("&nbsp;").take(pad + 6).collect::<String>()