Skip to content

Commit 7060f4c

Browse files
committed
Alias-ify some prettyprinting functions
1 parent 36c4cb3 commit 7060f4c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/comp/syntax/print/pprust.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,8 +1499,9 @@ fn next_comment(&ps s) -> option::t[lexer::cmnt] {
14991499
}
15001500
}
15011501

1502-
1503-
fn constr_args_to_str[T](fn(&T) -> str f,
1502+
// Removing the aliases from the type of f in the next two functions
1503+
// triggers memory corruption, but I haven't isolated the bug yet. FIXME
1504+
fn constr_args_to_str[T](&fn(&T) -> str f,
15041505
&(@ast::constr_arg_general[T])[] args) -> str {
15051506
auto comma = false;
15061507
auto s = "(";
@@ -1512,7 +1513,7 @@ fn constr_args_to_str[T](fn(&T) -> str f,
15121513
ret s;
15131514
}
15141515

1515-
fn constr_arg_to_str[T](fn(&T) -> str f, &ast::constr_arg_general_[T] c) ->
1516+
fn constr_arg_to_str[T](&fn(&T) -> str f, &ast::constr_arg_general_[T] c) ->
15161517
str {
15171518
alt (c) {
15181519
case (ast::carg_base) { ret "*"; }

0 commit comments

Comments
 (0)