Skip to content

Commit 1a2a8b6

Browse files
committed
Have fn_to_str use proto_to_str.
1 parent 2eb4762 commit 1a2a8b6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/comp/util/ppaux.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import syntax::print::pp;
1111
import syntax::print::pprust;
1212
import syntax::print::pprust::path_to_str;
1313
import syntax::print::pprust::constr_args_to_str;
14+
import syntax::print::pprust::proto_to_str;
1415
import pp::word;
1516
import pp::eof;
1617
import pp::zerobreak;
@@ -49,11 +50,7 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
4950
fn fn_to_str(&ctxt cx, ast::proto proto, option::t[ast::ident] ident,
5051
&arg[] inputs, t output, ast::controlflow cf,
5152
&(@constr)[] constrs) -> str {
52-
auto s;
53-
alt (proto) {
54-
case (ast::proto_iter) { s = "iter"; }
55-
case (ast::proto_fn) { s = "fn"; }
56-
}
53+
auto s = proto_to_str(proto);
5754
alt (ident) { case (some(?i)) { s += " "; s += i; } case (_) { } }
5855
s += "(";
5956
auto strs = [];

0 commit comments

Comments
 (0)