@@ -84,7 +84,7 @@ fn type_of(cx: &@crate_ctxt, sp: &span, t: ty::t) -> TypeRef {
84
84
if ty:: type_has_dynamic_size ( cx. tcx , t) {
85
85
cx. sess . span_fatal ( sp,
86
86
"type_of() called on a type with dynamic size: " +
87
- ty_to_str ( cx. tcx , t) ) ;
87
+ istr :: to_estr ( ty_to_str ( cx. tcx , t) ) ) ;
88
88
}
89
89
ret type_of_inner ( cx, sp, t) ;
90
90
}
@@ -1060,12 +1060,13 @@ fn get_tydesc(cx: &@block_ctxt, orig_t: ty::t, escapes: bool,
1060
1060
if id < vec:: len ( cx. fcx . lltydescs ) {
1061
1061
ret { kind : tk_param, result : rslt ( cx, cx. fcx . lltydescs [ id] ) } ;
1062
1062
} else {
1063
- bcx_tcx ( cx) . sess . span_bug ( cx. sp ,
1064
- "Unbound typaram in get_tydesc: " +
1065
- "orig_t = " +
1066
- ty_to_str ( bcx_tcx ( cx) , orig_t) +
1067
- " ty_param = " +
1068
- istr:: to_estr ( std:: uint:: str ( id) ) ) ;
1063
+ bcx_tcx ( cx) . sess . span_bug (
1064
+ cx. sp ,
1065
+ "Unbound typaram in get_tydesc: " +
1066
+ "orig_t = " +
1067
+ istr:: to_estr ( ty_to_str ( bcx_tcx ( cx) , orig_t) ) +
1068
+ " ty_param = " +
1069
+ istr:: to_estr ( std:: uint:: str ( id) ) ) ;
1069
1070
}
1070
1071
}
1071
1072
none. { /* fall through */ }
@@ -1129,7 +1130,7 @@ fn set_glue_inlining(cx: &@local_ctxt, f: ValueRef, t: ty::t) {
1129
1130
// Generates the declaration for (but doesn't emit) a type descriptor.
1130
1131
fn declare_tydesc ( cx : & @local_ctxt , sp : & span , t : ty:: t , ty_params : & [ uint ] )
1131
1132
-> @tydesc_info {
1132
- log "+++ declare_tydesc " + ty_to_str ( cx. ccx . tcx , t) ;
1133
+ log ~ "+++ declare_tydesc " + ty_to_str(cx.ccx.tcx, t);
1133
1134
let ccx = cx.ccx;
1134
1135
let llsize;
1135
1136
let llalign;
@@ -1163,7 +1164,7 @@ fn declare_tydesc(cx: &@local_ctxt, sp: &span, t: ty::t, ty_params: &[uint])
1163
1164
mutable cmp_glue: none :: < ValueRef > ,
1164
1165
mutable copy_glue: none :: < ValueRef > ,
1165
1166
ty_params: ty_params} ;
1166
- log "--- declare_tydesc " + ty_to_str ( cx. ccx . tcx , t) ;
1167
+ log ~ "--- declare_tydesc " + ty_to_str(cx.ccx.tcx, t);
1167
1168
ret info;
1168
1169
}
1169
1170
@@ -2029,9 +2030,9 @@ fn iter_sequence(cx: @block_ctxt, v: ValueRef, t: ty::t, f: &val_and_ty_fn)
2029
2030
ret iter_sequence_body ( cx, v, et, f, true , true ) ;
2030
2031
}
2031
2032
_ {
2032
- bcx_ccx( cx) . sess . bug ( "unexpected type in \
2033
- trans::iter_sequence: "
2034
- + ty_to_str ( cx. fcx . lcx . ccx . tcx , t) ) ;
2033
+ bcx_ccx( cx) . sess . bug (
2034
+ "unexpected type in trans::iter_sequence: "
2035
+ + istr :: to_estr ( ty_to_str ( cx. fcx . lcx . ccx . tcx , t) ) ) ;
2035
2036
}
2036
2037
}
2037
2038
}
@@ -2062,7 +2063,7 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
2062
2063
some ( _) { }
2063
2064
none. {
2064
2065
log #fmt [ "+++ lazily_emit_tydesc_glue TAKE %s" ,
2065
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2066
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2066
2067
let lcx = cx. fcx . lcx ;
2067
2068
let glue_fn =
2068
2069
declare_generic_glue ( lcx, ti. ty , T_glue_fn ( * lcx. ccx ) ,
@@ -2072,15 +2073,15 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
2072
2073
default_helper ( make_take_glue) ,
2073
2074
ti. ty_params , ~"take") ;
2074
2075
log #fmt[ "--- lazily_emit_tydesc_glue TAKE %s" ,
2075
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2076
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2076
2077
}
2077
2078
}
2078
2079
} else if field == abi:: tydesc_field_drop_glue {
2079
2080
alt { ti. drop_glue } {
2080
2081
some ( _) { }
2081
2082
none. {
2082
2083
log #fmt [ "+++ lazily_emit_tydesc_glue DROP %s" ,
2083
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2084
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2084
2085
let lcx = cx. fcx . lcx ;
2085
2086
let glue_fn =
2086
2087
declare_generic_glue ( lcx, ti. ty , T_glue_fn ( * lcx. ccx ) ,
@@ -2090,15 +2091,15 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
2090
2091
default_helper ( make_drop_glue) ,
2091
2092
ti. ty_params , ~"drop") ;
2092
2093
log #fmt[ "--- lazily_emit_tydesc_glue DROP %s" ,
2093
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2094
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2094
2095
}
2095
2096
}
2096
2097
} else if field == abi:: tydesc_field_free_glue {
2097
2098
alt { ti. free_glue } {
2098
2099
some ( _) { }
2099
2100
none. {
2100
2101
log #fmt [ "+++ lazily_emit_tydesc_glue FREE %s" ,
2101
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2102
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2102
2103
let lcx = cx. fcx . lcx ;
2103
2104
let glue_fn =
2104
2105
declare_generic_glue ( lcx, ti. ty , T_glue_fn ( * lcx. ccx ) ,
@@ -2108,18 +2109,18 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
2108
2109
default_helper ( make_free_glue) ,
2109
2110
ti. ty_params , ~"free") ;
2110
2111
log #fmt[ "--- lazily_emit_tydesc_glue FREE %s" ,
2111
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2112
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2112
2113
}
2113
2114
}
2114
2115
} else if field == abi:: tydesc_field_cmp_glue {
2115
2116
alt { ti. cmp_glue } {
2116
2117
some ( _) { }
2117
2118
none. {
2118
2119
log #fmt [ "+++ lazily_emit_tydesc_glue CMP %s" ,
2119
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2120
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2120
2121
ti. cmp_glue = some ( bcx_ccx ( cx) . upcalls . cmp_type ) ;
2121
2122
log #fmt[ "--- lazily_emit_tydesc_glue CMP %s" ,
2122
- ty_to_str ( bcx_tcx ( cx) , ti. ty ) ] ;
2123
+ istr :: to_estr ( ty_to_str ( bcx_tcx ( cx) , ti. ty ) ) ] ;
2123
2124
}
2124
2125
}
2125
2126
} else if field == abi:: tydesc_field_copy_glue {
@@ -2421,7 +2422,7 @@ fn copy_val_no_check(cx: &@block_ctxt, action: copy_action, dst: ValueRef,
2421
2422
}
2422
2423
}
2423
2424
ccx. sess . bug ( "unexpected type in trans::copy_val_no_check: " +
2424
- ty_to_str ( ccx. tcx , t) ) ;
2425
+ istr :: to_estr ( ty_to_str ( ccx. tcx , t) ) ) ;
2425
2426
}
2426
2427
2427
2428
@@ -2468,7 +2469,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef,
2468
2469
}
2469
2470
}
2470
2471
bcx_ccx ( cx) . sess . bug ( "unexpected type in trans::move_val: " +
2471
- ty_to_str ( tcx, t) ) ;
2472
+ istr :: to_estr ( ty_to_str ( tcx, t) ) ) ;
2472
2473
}
2473
2474
2474
2475
fn move_val_if_temp ( cx : @block_ctxt , action : copy_action , dst : ValueRef ,
@@ -4627,9 +4628,8 @@ fn trans_fail_expr(cx: &@block_ctxt, sp_opt: &option::t<span>,
4627
4628
ret trans_fail_value ( bcx, sp_opt, elt) ;
4628
4629
} else {
4629
4630
bcx_ccx ( cx) . sess . span_bug ( expr. span ,
4630
- "fail called with unsupported \
4631
- type "
4632
- + ty_to_str ( tcx, e_ty) ) ;
4631
+ "fail called with unsupported type "
4632
+ + istr:: to_estr ( ty_to_str ( tcx, e_ty) ) ) ;
4633
4633
}
4634
4634
}
4635
4635
_ { ret trans_fail( bcx, sp_opt, ~"explicit failure") ; }
0 commit comments