From 65b75788517ad797c1ae86f9d0c550ec620c4dfc Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 8 Apr 2011 21:27:54 -0700 Subject: rustc: Remove generalize_ty. Instead, maintain an explicit type parameter substitution list. --- src/comp/pretty/pprust.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/comp/pretty') diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index 6aee29d7..c4c50845 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -50,6 +50,15 @@ fn expr_to_str(&@ast.expr e) -> str { ret writer.get_str(); } +fn pat_to_str(&@ast.pat p) -> str { + auto writer = io.string_writer(); + auto s = @rec(s=pp.mkstate(writer.get_writer(), 78u), + comments=option.none[vec[lexer.cmnt]], + mutable cur_cmnt=0u); + print_pat(s, p); + ret writer.get_str(); +} + impure fn hbox(ps s) { pp.hbox(s.s, indent_unit); } -- cgit v1.2.3