Skip to content

Commit 4ce4d88

Browse files
brsongraydon
authored andcommitted
Add ty_port and ty_chan to expr_ty function
1 parent 83f758c commit 4ce4d88

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/comp/middle/ty.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,19 @@ fn ty_to_str(&@t typ) -> str {
148148
}
149149

150150
alt (typ.struct) {
151-
case (ty_native) { s = "native"; }
152-
case (ty_nil) { s = "()"; }
153-
case (ty_bool) { s = "bool"; }
154-
case (ty_int) { s = "int"; }
155-
case (ty_uint) { s = "uint"; }
156-
case (ty_machine(?tm)) { s = common.ty_mach_to_str(tm); }
157-
case (ty_char) { s = "char"; }
158-
case (ty_str) { s = "str"; }
159-
case (ty_box(?t)) { s = "@" + ty_to_str(t); }
160-
case (ty_vec(?t)) { s = "vec[" + ty_to_str(t) + "]"; }
161-
case (ty_type) { s = "type"; }
151+
case (ty_native) { s = "native"; }
152+
case (ty_nil) { s = "()"; }
153+
case (ty_bool) { s = "bool"; }
154+
case (ty_int) { s = "int"; }
155+
case (ty_uint) { s = "uint"; }
156+
case (ty_machine(?tm)) { s = common.ty_mach_to_str(tm); }
157+
case (ty_char) { s = "char"; }
158+
case (ty_str) { s = "str"; }
159+
case (ty_box(?t)) { s = "@" + ty_to_str(t); }
160+
case (ty_vec(?t)) { s = "vec[" + ty_to_str(t) + "]"; }
161+
case (ty_port(?t)) { s = "port[" + ty_to_str(t) + "]"; }
162+
case (ty_chan(?t)) { s = "chan[" + ty_to_str(t) + "]"; }
163+
case (ty_type) { s = "type"; }
162164

163165
case (ty_tup(?elems)) {
164166
auto f = ty_to_str;

0 commit comments

Comments
 (0)