about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustdoc/tystr_pass.rs5
-rw-r--r--src/libsyntax/print/pprust.rs3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/librustdoc/tystr_pass.rs b/src/librustdoc/tystr_pass.rs
index e5f304ee8ac..916101709fe 100644
--- a/src/librustdoc/tystr_pass.rs
+++ b/src/librustdoc/tystr_pass.rs
@@ -75,7 +75,7 @@ fn get_fn_sig(srv: astsrv::Srv, fn_id: doc::AstId) -> Option<~str> {
             ident: ident,
             node: ast::foreign_item_fn(ref decl, _, ref tys), _
           }, _, _) => {
-            Some(pprust::fun_to_str(decl, ident, tys,
+            Some(pprust::fun_to_str(decl, ident, None, tys,
                                     extract::interner()))
           }
           _ => fail!(~"get_fn_sig: fn_id not bound to a fn item")
@@ -215,6 +215,7 @@ fn get_method_sig(
                       Some(pprust::fun_to_str(
                           &ty_m.decl,
                           ty_m.ident,
+                          Some(ty_m.self_ty.node),
                           &ty_m.generics,
                           extract::interner()
                       ))
@@ -223,6 +224,7 @@ fn get_method_sig(
                       Some(pprust::fun_to_str(
                           &m.decl,
                           m.ident,
+                          Some(m.self_ty.node),
                           &m.generics,
                           extract::interner()
                       ))
@@ -242,6 +244,7 @@ fn get_method_sig(
                     Some(pprust::fun_to_str(
                         &method.decl,
                         method.ident,
+                        Some(method.self_ty.node),
                         &method.generics,
                         extract::interner()
                     ))
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 724e61daea7..f74b8eb42b8 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -181,10 +181,11 @@ pub fn path_to_str(&&p: @ast::path, intr: @ident_interner) -> ~str {
 }
 
 pub fn fun_to_str(decl: &ast::fn_decl, name: ast::ident,
+                  opt_self_ty: Option<ast::self_ty_>,
                   generics: &ast::Generics, intr: @ident_interner) -> ~str {
     do io::with_str_writer |wr| {
         let s = rust_printer(wr, intr);
-        print_fn(s, decl, None, name, generics, None, ast::inherited);
+        print_fn(s, decl, None, name, generics, opt_self_ty, ast::inherited);
         end(s); // Close the head box
         end(s); // Close the outer box
         eof(s.s);