about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-03-13 23:38:33 +0000
committervarkor <github@varkor.com>2019-03-18 19:38:23 +0000
commit14913159e0509a2b7d1c86984a044b76dd4e4902 (patch)
tree2d2f70d84fb44c899c46b51d557407c4e5359f0a /src/librustdoc/html
parentc915fe0245c7506e3f15660dee2d597fb48e9230 (diff)
downloadrust-14913159e0509a2b7d1c86984a044b76dd4e4902.tar.gz
rust-14913159e0509a2b7d1c86984a044b76dd4e4902.zip
Implement `Clean` for const generics
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/format.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 36257914d19..2cba3c58889 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -259,6 +259,12 @@ impl fmt::Display for clean::Lifetime {
     }
 }
 
+impl fmt::Display for clean::Constant {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "{}: {}", self.expr, self.type_)
+    }
+}
+
 impl fmt::Display for clean::PolyTrait {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         if !self.generic_params.is_empty() {