Skip to content

Commit b39e664

Browse files
committed
Make clean::Constant display respect f.alternate()
1 parent 9925d9b commit b39e664

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustdoc/html/format.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ impl fmt::Display for clean::Lifetime {
261261

262262
impl fmt::Display for clean::Constant {
263263
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
264-
write!(f, "{}: {}", self.expr, self.type_)
264+
fmt::Display::fmt(&self.expr, f)?;
265+
f.write_str(": ")?;
266+
fmt::Display::fmt(&self.type_, f)
265267
}
266268
}
267269

0 commit comments

Comments
 (0)