Skip to content

Commit 78baf0e

Browse files
committed
Drive-by: pprust::*_to_str for TypeMethod, Method, and FnDecl.
1 parent b25fe99 commit 78baf0e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/libsyntax/print/pprust.rs

+12
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,18 @@ pub fn generics_to_str(generics: &ast::Generics) -> ~str {
183183
to_str(|s| s.print_generics(generics))
184184
}
185185

186+
pub fn ty_method_to_str(p: &ast::TypeMethod) -> ~str {
187+
to_str(|s| s.print_ty_method(p))
188+
}
189+
190+
pub fn method_to_str(p: &ast::Method) -> ~str {
191+
to_str(|s| s.print_method(p))
192+
}
193+
194+
pub fn fn_block_to_str(p: &ast::FnDecl) -> ~str {
195+
to_str(|s| s.print_fn_block_args(p))
196+
}
197+
186198
pub fn path_to_str(p: &ast::Path) -> ~str {
187199
to_str(|s| s.print_path(p, false))
188200
}

0 commit comments

Comments
 (0)