about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2014-04-11 11:30:12 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2014-04-17 11:42:30 +0200
commit78baf0e9689c73d549cf194ecd97f704702ec9f8 (patch)
tree9eb3e7b46651be550033350265629671eefb444e /src/libsyntax
parentb25fe99331a114b92131ecd4bd37abefb2508ff0 (diff)
downloadrust-78baf0e9689c73d549cf194ecd97f704702ec9f8.tar.gz
rust-78baf0e9689c73d549cf194ecd97f704702ec9f8.zip
Drive-by: `pprust::*_to_str` for TypeMethod, Method, and FnDecl.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/print/pprust.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 928ec09b3ae..429540efd37 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -183,6 +183,18 @@ pub fn generics_to_str(generics: &ast::Generics) -> ~str {
     to_str(|s| s.print_generics(generics))
 }
 
+pub fn ty_method_to_str(p: &ast::TypeMethod) -> ~str {
+    to_str(|s| s.print_ty_method(p))
+}
+
+pub fn method_to_str(p: &ast::Method) -> ~str {
+    to_str(|s| s.print_method(p))
+}
+
+pub fn fn_block_to_str(p: &ast::FnDecl) -> ~str {
+    to_str(|s| s.print_fn_block_args(p))
+}
+
 pub fn path_to_str(p: &ast::Path) -> ~str {
     to_str(|s| s.print_path(p, false))
 }