rollup merge of #20269: dirk/indent-where
* Add <span class=‘where’> around clause * CSS rule to format the span (for issue #20176)
This commit is contained in:
@@ -120,7 +120,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()));
|
||||
@@ -146,6 +146,7 @@ impl<'a> fmt::Show for WhereClause<'a> {
|
||||
}
|
||||
}
|
||||
}
|
||||
try!(f.write("</span>".as_bytes()));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,6 +306,11 @@ nav.sub {
|
||||
font-size: 1em;
|
||||
position: relative;
|
||||
}
|
||||
/* Shift "where ..." part of method definition down a line */
|
||||
.content .method .where { display: block; }
|
||||
/* Bit of whitespace to indent it */
|
||||
.content .method .where::before { content: ' '; }
|
||||
|
||||
.content .methods .docblock { margin-left: 40px; }
|
||||
|
||||
.content .impl-items .docblock { margin-left: 40px; }
|
||||
|
||||
Reference in New Issue
Block a user