]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/format.rs
Rollup merge of #106051 - jyn514:cranelift-std, r=bjorn3
[rust.git] / src / librustdoc / html / format.rs
index 39e2a90222670250fd8c0c81e75fe50901430435..5ad24bf2681332b83efb73a192b345bfa4993113 100644 (file)
@@ -1655,10 +1655,10 @@ pub(crate) fn print<'a, 'tcx: 'a>(
         &'a self,
         cx: &'a Context<'tcx>,
     ) -> impl fmt::Display + 'a + Captures<'tcx> {
-        match self {
-            clean::types::Term::Type(ty) => ty.print(cx),
-            _ => todo!(),
-        }
+        display_fn(move |f| match self {
+            clean::types::Term::Type(ty) => fmt::Display::fmt(&ty.print(cx), f),
+            clean::types::Term::Constant(ct) => fmt::Display::fmt(&ct.print(cx.tcx()), f),
+        })
     }
 }