Skip to content

Commit 27e7115

Browse files
committed
---
yaml --- r: 5005 b: refs/heads/master c: d2ae28f h: refs/heads/master i: 5003: 6f01220 v: v3
1 parent 54b072c commit 27e7115

File tree

13 files changed

+222
-200
lines changed

13 files changed

+222
-200
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 54691f9a6cb6a92152fe57e4ca4b9fb6298dac0e
2+
refs/heads/master: d2ae28fc99328ab1b7176560ed643a84a8883403

trunk/src/comp/driver/rustc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn time<@T>(do_it: bool, what: str, thunk: fn() -> T) -> T {
118118
let rv = thunk();
119119
let end = std::time::precise_time_s();
120120
log_err #fmt["time: %s took %s s", what,
121-
common::float_to_str(end - start, 3u)];
121+
istr::to_estr(common::float_to_str(end - start, 3u))];
122122
ret rv;
123123
}
124124

@@ -184,7 +184,9 @@ fn pretty_print_input(sess: session::session, cfg: ast::crate_cfg, input: str,
184184
pp::space(s.s);
185185
pp::word(s.s, "as");
186186
pp::space(s.s);
187-
pp::word(s.s, ppaux::ty_to_str(tcx, ty::expr_ty(tcx, expr)));
187+
pp::word(
188+
s.s,
189+
istr::to_estr(ppaux::ty_to_str(tcx, ty::expr_ty(tcx, expr))));
188190
pprust::pclose(s);
189191
}
190192
_ { }

trunk/src/comp/metadata/creader.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ fn default_native_lib_naming(sess: session::session, static: bool) ->
123123
}
124124

125125
fn find_library_crate(sess: &session::session, ident: &ast::ident,
126-
metas: &[@ast::meta_item], library_search_paths: &[istr])
126+
metas: &[@ast::meta_item],
127+
library_search_paths: &[istr])
127128
-> option::t<{ident: istr, data: @[u8]}> {
128129

129130
attr::require_unique_names(sess, metas);

trunk/src/comp/middle/alias.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,10 @@ fn check_for(cx: &ctx, local: &@ast::local, seq: &@ast::expr, blk: &ast::blk,
390390
ty::ty_vec(mt) { if mt.mut != ast::imm { unsafe = [seq_t]; } }
391391
ty::ty_str. | ty::ty_istr. {/* no-op */ }
392392
_ {
393-
cx.tcx.sess.span_unimpl(seq.span,
394-
"unknown seq type " +
395-
util::ppaux::ty_to_str(cx.tcx, seq_t));
393+
cx.tcx.sess.span_unimpl(
394+
seq.span,
395+
"unknown seq type " +
396+
istr::to_estr(util::ppaux::ty_to_str(cx.tcx, seq_t)));
396397
}
397398
}
398399
let bindings = ast_util::pat_binding_ids(local.node.pat);

trunk/src/comp/middle/kind.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ import syntax::visit;
7777

7878
import std::vec;
7979
import std::option;
80+
import std::istr;
8081

8182
import ast::kind;
8283
import ast::kind_unique;
@@ -115,13 +116,13 @@ fn need_expr_kind(tcx: &ty::ctxt, e: &@ast::expr, k_need: ast::kind,
115116
let tk = type_and_kind(tcx, e);
116117
log #fmt["for %s: want %s type, got %s type %s", descr,
117118
kind_to_str(k_need), kind_to_str(tk.kind),
118-
util::ppaux::ty_to_str(tcx, tk.ty)];
119+
istr::to_estr(util::ppaux::ty_to_str(tcx, tk.ty))];
119120

120121
if !kind_lteq(k_need, tk.kind) {
121122
let s =
122123
#fmt["mismatched kinds for %s: needed %s type, got %s type %s",
123124
descr, kind_to_str(k_need), kind_to_str(tk.kind),
124-
util::ppaux::ty_to_str(tcx, tk.ty)];
125+
istr::to_estr(util::ppaux::ty_to_str(tcx, tk.ty))];
125126
tcx.sess.span_err(e.span, s);
126127
}
127128
}
@@ -170,7 +171,7 @@ fn check_expr(tcx: &ty::ctxt, e: &@ast::expr) {
170171
#fmt["mismatched kinds for typaram %d: \
171172
needed %s type, got %s type %s",
172173
i, kind_to_str(k_need), kind_to_str(k),
173-
util::ppaux::ty_to_str(tcx, t)];
174+
istr::to_estr(util::ppaux::ty_to_str(tcx, t))];
174175
tcx.sess.span_err(e.span, s);
175176
}
176177
i += 1;

trunk/src/comp/middle/trans.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn type_of(cx: &@crate_ctxt, sp: &span, t: ty::t) -> TypeRef {
8484
if ty::type_has_dynamic_size(cx.tcx, t) {
8585
cx.sess.span_fatal(sp,
8686
"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)));
8888
}
8989
ret type_of_inner(cx, sp, t);
9090
}
@@ -1060,12 +1060,13 @@ fn get_tydesc(cx: &@block_ctxt, orig_t: ty::t, escapes: bool,
10601060
if id < vec::len(cx.fcx.lltydescs) {
10611061
ret {kind: tk_param, result: rslt(cx, cx.fcx.lltydescs[id])};
10621062
} 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)));
10691070
}
10701071
}
10711072
none. {/* fall through */ }
@@ -1129,7 +1130,7 @@ fn set_glue_inlining(cx: &@local_ctxt, f: ValueRef, t: ty::t) {
11291130
// Generates the declaration for (but doesn't emit) a type descriptor.
11301131
fn declare_tydesc(cx: &@local_ctxt, sp: &span, t: ty::t, ty_params: &[uint])
11311132
-> @tydesc_info {
1132-
log "+++ declare_tydesc " + ty_to_str(cx.ccx.tcx, t);
1133+
log ~"+++ declare_tydesc " + ty_to_str(cx.ccx.tcx, t);
11331134
let ccx = cx.ccx;
11341135
let llsize;
11351136
let llalign;
@@ -1163,7 +1164,7 @@ fn declare_tydesc(cx: &@local_ctxt, sp: &span, t: ty::t, ty_params: &[uint])
11631164
mutable cmp_glue: none::<ValueRef>,
11641165
mutable copy_glue: none::<ValueRef>,
11651166
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);
11671168
ret info;
11681169
}
11691170
@@ -2029,9 +2030,9 @@ fn iter_sequence(cx: @block_ctxt, v: ValueRef, t: ty::t, f: &val_and_ty_fn)
20292030
ret iter_sequence_body(cx, v, et, f, true, true);
20302031
}
20312032
_ {
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)));
20352036
}
20362037
}
20372038
}
@@ -2062,7 +2063,7 @@ fn lazily_emit_tydesc_glue(cx: &@block_ctxt, field: int,
20622063
some(_) { }
20632064
none. {
20642065
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))];
20662067
let lcx = cx.fcx.lcx;
20672068
let glue_fn =
20682069
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,
20722073
default_helper(make_take_glue),
20732074
ti.ty_params, ~"take");
20742075
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))];
20762077
}
20772078
}
20782079
} else if field == abi::tydesc_field_drop_glue {
20792080
alt { ti.drop_glue } {
20802081
some(_) { }
20812082
none. {
20822083
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))];
20842085
let lcx = cx.fcx.lcx;
20852086
let glue_fn =
20862087
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,
20902091
default_helper(make_drop_glue),
20912092
ti.ty_params, ~"drop");
20922093
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))];
20942095
}
20952096
}
20962097
} else if field == abi::tydesc_field_free_glue {
20972098
alt { ti.free_glue } {
20982099
some(_) { }
20992100
none. {
21002101
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))];
21022103
let lcx = cx.fcx.lcx;
21032104
let glue_fn =
21042105
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,
21082109
default_helper(make_free_glue),
21092110
ti.ty_params, ~"free");
21102111
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))];
21122113
}
21132114
}
21142115
} else if field == abi::tydesc_field_cmp_glue {
21152116
alt { ti.cmp_glue } {
21162117
some(_) { }
21172118
none. {
21182119
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))];
21202121
ti.cmp_glue = some(bcx_ccx(cx).upcalls.cmp_type);
21212122
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))];
21232124
}
21242125
}
21252126
} 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,
24212422
}
24222423
}
24232424
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)));
24252426
}
24262427

24272428

@@ -2468,7 +2469,7 @@ fn move_val(cx: @block_ctxt, action: copy_action, dst: ValueRef,
24682469
}
24692470
}
24702471
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)));
24722473
}
24732474

24742475
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>,
46274628
ret trans_fail_value(bcx, sp_opt, elt);
46284629
} else {
46294630
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)));
46334633
}
46344634
}
46354635
_ { ret trans_fail(bcx, sp_opt, ~"explicit failure"); }

trunk/src/comp/middle/tstate/auxiliary.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,9 @@ fn callee_modes(fcx: &fn_ctxt, callee: node_id) -> [ty::mode] {
11191119
}
11201120
_ {
11211121
// Shouldn't happen; callee should be ty_fn.
1122-
fcx.ccx.tcx.sess.bug("non-fn callee type in callee_modes: " +
1123-
util::ppaux::ty_to_str(fcx.ccx.tcx, ty));
1122+
fcx.ccx.tcx.sess.bug(
1123+
"non-fn callee type in callee_modes: " +
1124+
istr::to_estr(util::ppaux::ty_to_str(fcx.ccx.tcx, ty)));
11241125
}
11251126
}
11261127
}

trunk/src/comp/middle/tstate/collect_locals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ fn add_constraint(tcx: &ty::ctxt, c: sp_constr, next: uint, tbl: constr_map)
9494
to a bit number in the precondition/postcondition vectors */
9595
fn mk_fn_info(ccx: &crate_ctxt, f: &_fn, tp: &[ty_param], f_sp: &span,
9696
f_name: &fn_ident, id: node_id) {
97-
let name = istr::from_estr(fn_ident_to_string(id, f_name));
97+
let name = fn_ident_to_string(id, f_name);
9898
let res_map = @new_def_hash::<constraint>();
9999
let next: uint = 0u;
100100

trunk/src/comp/middle/tstate/pre_post_conditions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ fn fn_pre_post(f: &_fn, tps: &[ty_param], sp: &span, i: &fn_ident,
751751
let fcx =
752752
{enclosing: ccx.fm.get(id),
753753
id: id,
754-
name: istr::from_estr(fn_ident_to_string(id, i)),
754+
name: fn_ident_to_string(id, i),
755755
ccx: ccx};
756756
find_pre_post_fn(fcx, f);
757757
}

0 commit comments

Comments
 (0)