Skip to content

Commit cbfc8fe

Browse files
Force backline on all where in docs
1 parent d880128 commit cbfc8fe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustdoc/html/format.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl<'a> fmt::Display for WhereClause<'a> {
165165
if f.alternate() {
166166
clause.push_str(" where ");
167167
} else {
168-
clause.push_str(" <span class='where'>where ");
168+
clause.push_str(" <span class='where fmt-newline'>where ");
169169
}
170170
for (i, pred) in gens.where_predicates.iter().enumerate() {
171171
if i > 0 {
@@ -208,10 +208,9 @@ impl<'a> fmt::Display for WhereClause<'a> {
208208
clause.push_str("</span>");
209209
let plain = format!("{:#}", self);
210210
if plain.len() + pad > 80 {
211-
//break it onto its own line regardless, but make sure method impls and trait
212-
//blocks keep their fixed padding (2 and 9, respectively)
211+
// break it onto its own line regardless, but make sure method impls and trait
212+
// blocks keep their fixed padding (2 and 9, respectively)
213213
let padding = if pad > 10 {
214-
clause = clause.replace("class='where'", "class='where fmt-newline'");
215214
repeat("&nbsp;").take(8).collect::<String>()
216215
} else {
217216
repeat("&nbsp;").take(pad + 6).collect::<String>()

0 commit comments

Comments
 (0)