about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustdoc/clean/inline.rs2
-rw-r--r--src/librustdoc/clean/mod.rs22
-rw-r--r--src/librustdoc/html/format.rs6
3 files changed, 21 insertions, 9 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs
index d755378366e..4bef672ea0d 100644
--- a/src/librustdoc/clean/inline.rs
+++ b/src/librustdoc/clean/inline.rs
@@ -324,7 +324,7 @@ fn build_impl(cx: &DocContext, tcx: &ty::ctxt,
             trait_: associated_trait.clean(cx).map(|bound| {
                 match bound {
                     clean::TraitBound(ty) => ty,
-                    clean::UnboxedFnBound => unimplemented!(),
+                    clean::UnboxedFnBound(..) |
                     clean::RegionBound(..) |
                     clean::UnknownBound => unreachable!(),
                 }
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index e6e4453c4da..0b37a21cb0b 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -474,7 +474,7 @@ impl Clean<TyParam> for ty::TypeParameterDef {
 #[deriving(Clone, Encodable, Decodable, PartialEq)]
 pub enum TyParamBound {
     RegionBound(Lifetime),
-    UnboxedFnBound, // FIXME
+    UnboxedFnBound(UnboxedFnType),
     UnknownBound,
     TraitBound(Type)
 }
@@ -483,10 +483,7 @@ impl Clean<TyParamBound> for ast::TyParamBound {
     fn clean(&self, cx: &DocContext) -> TyParamBound {
         match *self {
             ast::RegionTyParamBound(lt) => RegionBound(lt.clean(cx)),
-            ast::UnboxedFnTyParamBound(_) => {
-                // FIXME(pcwalton): Wrong.
-                UnboxedFnBound
-            },
+            ast::UnboxedFnTyParamBound(ref ty) => { UnboxedFnBound(ty.clean(cx)) },
             ast::TraitTyParamBound(ref t) => TraitBound(t.clean(cx)),
         }
     }
@@ -599,6 +596,21 @@ impl Clean<Option<Vec<TyParamBound>>> for subst::Substs {
 }
 
 #[deriving(Clone, Encodable, Decodable, PartialEq)]
+pub struct UnboxedFnType {
+    pub path: Path,
+    pub decl: FnDecl
+}
+
+impl Clean<UnboxedFnType> for ast::UnboxedFnBound {
+    fn clean(&self, cx: &DocContext) -> UnboxedFnType {
+        UnboxedFnType {
+            path: self.path.clean(cx),
+            decl: self.decl.clean(cx)
+        }
+    }
+}
+
+#[deriving(Clone, Encodable, Decodable, PartialEq)]
 pub struct Lifetime(String);
 
 impl Lifetime {
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 7f5be22f391..9d77b621d4a 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -143,8 +143,8 @@ impl fmt::Show for clean::TyParamBound {
             clean::RegionBound(ref lt) => {
                 write!(f, "{}", *lt)
             }
-            clean::UnboxedFnBound(..) => {
-                write!(f, "Fn(???)") // FIXME
+            clean::UnboxedFnBound(ref ty) => {
+                write!(f, "{}{}", ty.path, ty.decl)
             }
             clean::UnknownBound => {
                 write!(f, "'static")
@@ -408,7 +408,7 @@ impl fmt::Show for clean::Type {
                            for bound in decl.bounds.iter() {
                                 match *bound {
                                     clean::RegionBound(..) |
-                                    clean::UnboxedFnBound |
+                                    clean::UnboxedFnBound(..) |
                                     clean::UnknownBound => {}
                                     clean::TraitBound(ref t) => {
                                         if ret.len() == 0 {