]> git.lizzy.rs Git - rust.git/commitdiff
Drive-by: `pprust::*_to_str` for TypeMethod, Method, and FnDecl.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Fri, 11 Apr 2014 09:30:12 +0000 (11:30 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 17 Apr 2014 09:42:30 +0000 (11:42 +0200)
src/libsyntax/print/pprust.rs

index 928ec09b3aec27ec66788045f578ed63d7a2c563..429540efd37e772a16dbf1f284ed278a5dc166b1 100644 (file)
@@ -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))
 }