summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-03-16 18:57:43 -0700
committerbors <bors@rust-lang.org>2013-03-16 18:57:43 -0700
commitf54adca7c984c75334d9cb73ec85bf3b5c326ed9 (patch)
tree5c691dd5ab292eefde75c5451cba9a5899b85d03 /src/libsyntax/print/pprust.rs
parent6307d24364c02ff636b6c76e0ac8b379d73b86f7 (diff)
parent246573d5ae1024193914de8c9be9230860781410 (diff)
downloadrust-f54adca7c984c75334d9cb73ec85bf3b5c326ed9.tar.gz
rust-f54adca7c984c75334d9cb73ec85bf3b5c326ed9.zip
auto merge of #5374 : z0w0/rust/rustdoc-explicit-self, r=z0w0
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-rw-r--r--src/libsyntax/print/pprust.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 370434010b2..5aae5570dbf 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);
@@ -2274,7 +2275,7 @@ pub mod test {
             cf: ast::return_val
         };
         let generics = ast_util::empty_generics();
-        check_equal (&fun_to_str(&decl, abba_ident, &generics, mock_interner),
+        check_equal (&fun_to_str(&decl, abba_ident, None, &generics, mock_interner),
                      &~"fn abba()");
     }