Modify the fn vistors in walk so that they can handle functions without names. Update the typestate code to understand this.

This commit is contained in:
Michael Sullivan 2011-06-24 15:11:22 -07:00
parent 142ff011da
commit f3717da1b1
7 changed files with 42 additions and 25 deletions

View file

@ -34,6 +34,13 @@ fn mode_str_1(&ty::mode m) -> str {
}
}
fn fn_ident_to_string(ast::node_id id, &ast::fn_ident i) -> str {
ret alt (i) {
case (none) { "anon" + istr(id) }
case (some(?s)) { s }
};
}
fn ty_to_str(&ctxt cx, &t typ) -> str {
fn fn_input_to_str(&ctxt cx, &rec(middle::ty::mode mode, t ty) input) ->
str {