@@ -147,35 +147,35 @@ fn ty_to_str(&@t typ) -> str {
147
147
}
148
148
149
149
alt ( typ. struct ) {
150
- case ( ty_native) { s = "native" ; }
151
- case ( ty_nil) { s = "()" ; }
152
- case ( ty_bool) { s = "bool" ; }
153
- case ( ty_int) { s = "int" ; }
154
- case ( ty_uint) { s = "uint" ; }
155
- case ( ty_machine ( ?tm) ) { s = common. ty_mach_to_str ( tm) ; }
156
- case ( ty_char) { s = "char" ; }
157
- case ( ty_str) { s = "str" ; }
158
- case ( ty_box ( ?t) ) { s = "@" + ty_to_str ( t) ; }
159
- case ( ty_vec ( ?t) ) { s = "vec[" + ty_to_str ( t) + "]" ; }
160
- case ( ty_port ( ?t) ) { s = "port[" + ty_to_str ( t) + "]" ; }
161
- case ( ty_chan ( ?t) ) { s = "chan[" + ty_to_str ( t) + "]" ; }
162
- case ( ty_type) { s = "type" ; }
150
+ case ( ty_native) { s + = "native" ; }
151
+ case ( ty_nil) { s + = "()" ; }
152
+ case ( ty_bool) { s + = "bool" ; }
153
+ case ( ty_int) { s + = "int" ; }
154
+ case ( ty_uint) { s + = "uint" ; }
155
+ case ( ty_machine ( ?tm) ) { s + = common. ty_mach_to_str ( tm) ; }
156
+ case ( ty_char) { s + = "char" ; }
157
+ case ( ty_str) { s + = "str" ; }
158
+ case ( ty_box ( ?t) ) { s + = "@" + ty_to_str ( t) ; }
159
+ case ( ty_vec ( ?t) ) { s + = "vec[" + ty_to_str ( t) + "]" ; }
160
+ case ( ty_port ( ?t) ) { s + = "port[" + ty_to_str ( t) + "]" ; }
161
+ case ( ty_chan ( ?t) ) { s + = "chan[" + ty_to_str ( t) + "]" ; }
162
+ case ( ty_type) { s + = "type" ; }
163
163
164
164
case ( ty_tup ( ?elems) ) {
165
165
auto f = ty_to_str;
166
166
auto strs = _vec. map [ @t, str] ( f, elems) ;
167
- s = "tup(" + _str. connect ( strs, "," ) + ")" ;
167
+ s + = "tup(" + _str. connect ( strs, "," ) + ")" ;
168
168
}
169
169
170
170
case ( ty_rec ( ?elems) ) {
171
171
auto f = field_to_str;
172
172
auto strs = _vec. map [ field, str ] ( f, elems) ;
173
- s = "rec(" + _str. connect ( strs, "," ) + ")" ;
173
+ s + = "rec(" + _str. connect ( strs, "," ) + ")" ;
174
174
}
175
175
176
176
case ( ty_tag ( ?id, ?tps) ) {
177
177
// The user should never see this if the cname is set properly!
178
- s = "<tag#" + util. common . istr ( id. _0 ) + ":" +
178
+ s + = "<tag#" + util. common . istr ( id. _0 ) + ":" +
179
179
util. common . istr ( id. _1 ) + ">" ;
180
180
if ( _vec. len [ @t] ( tps) > 0 u) {
181
181
auto f = ty_to_str;
@@ -185,31 +185,31 @@ fn ty_to_str(&@t typ) -> str {
185
185
}
186
186
187
187
case ( ty_fn ( ?proto, ?inputs, ?output) ) {
188
- s = fn_to_str ( proto, none[ ast. ident ] , inputs, output) ;
188
+ s + = fn_to_str ( proto, none[ ast. ident ] , inputs, output) ;
189
189
}
190
190
191
191
case ( ty_native_fn ( _, ?inputs, ?output) ) {
192
- s = fn_to_str ( ast. proto_fn , none[ ast. ident ] , inputs, output) ;
192
+ s + = fn_to_str ( ast. proto_fn , none[ ast. ident ] , inputs, output) ;
193
193
}
194
194
195
195
case ( ty_obj ( ?meths) ) {
196
196
auto f = method_to_str;
197
197
auto m = _vec. map [ method, str ] ( f, meths) ;
198
- s = "obj {\n \t " + _str. connect ( m, "\n \t " ) + "\n }" ;
198
+ s + = "obj {\n \t " + _str. connect ( m, "\n \t " ) + "\n }" ;
199
199
}
200
200
201
201
case ( ty_var ( ?v) ) {
202
- s = "<T" + util. common . istr ( v) + ">" ;
202
+ s + = "<T" + util. common . istr ( v) + ">" ;
203
203
}
204
204
205
205
case ( ty_local ( ?id) ) {
206
- s = "<L" + util. common . istr ( id. _0 ) + ":" + util . common . istr ( id . _1 )
207
- + ">" ;
206
+ s + = "<L" + util. common . istr ( id. _0 ) + ":" +
207
+ util . common . istr ( id . _1 ) + ">" ;
208
208
}
209
209
210
210
case ( ty_param ( ?id) ) {
211
- s = "<P" + util. common . istr ( id. _0 ) + ":" + util . common . istr ( id . _1 )
212
- + ">" ;
211
+ s + = "<P" + util. common . istr ( id. _0 ) + ":" +
212
+ util . common . istr ( id . _1 ) + ">" ;
213
213
}
214
214
}
215
215
0 commit comments