Make sure the pretty-printer understand resources
This commit is contained in:
parent
7b1b5d5a8a
commit
bf20fe5575
|
@ -139,6 +139,9 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
|
|||
auto m = vec::map[method, str](f, meths);
|
||||
s += "obj {\n\t" + str::connect(m, "\n\t") + "\n}";
|
||||
}
|
||||
case (ty_res(?id, _, _)) {
|
||||
s += "<resource#" + istr(id._0) + ":" + istr(id._1) + ">";
|
||||
}
|
||||
case (ty_var(?v)) { s += "<T" + istr(v) + ">"; }
|
||||
case (ty_param(?id)) {
|
||||
s += "'" + str::unsafe_from_bytes([('a' as u8) + (id as u8)]);
|
||||
|
|
|
@ -442,7 +442,7 @@ fn print_item(&ps s, &@ast::item item) {
|
|||
bclose(s, item.span);
|
||||
}
|
||||
case (ast::item_res(?dt, ?dt_id, ?tps, ?ct_id)) {
|
||||
head(s, "res");
|
||||
head(s, "resource");
|
||||
word(s.s, item.ident);
|
||||
print_type_params(s, tps);
|
||||
popen(s);
|
||||
|
|
Loading…
Reference in New Issue