Indent where clause in rustdoc

* Add <span class=‘where’> around clause
* CSS rule to format the span
(for #20176)
This commit is contained in:
Dirk Gadsden
2014-12-27 22:45:13 -05:00
parent 070ab63807
commit 4477c7c52e
2 changed files with 5 additions and 1 deletions

View File

@@ -123,7 +123,7 @@ impl<'a> fmt::Show for WhereClause<'a> {
if gens.where_predicates.len() == 0 {
return Ok(());
}
try!(f.write(" where ".as_bytes()));
try!(f.write(" <span class='where'>where ".as_bytes()));
for (i, pred) in gens.where_predicates.iter().enumerate() {
if i > 0 {
try!(f.write(", ".as_bytes()));
@@ -149,6 +149,7 @@ impl<'a> fmt::Show for WhereClause<'a> {
}
}
}
try!(f.write("</span>".as_bytes()));
Ok(())
}
}