Skip to content

Commit 119f43e

Browse files
committed
Rename str::connect_ivec to str::connect
1 parent 21693db commit 119f43e

File tree

13 files changed

+21
-21
lines changed

13 files changed

+21
-21
lines changed

src/comp/back/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
360360
str::split(fs::basename(output), '.' as u8);
361361
assert (ivec::len(os) >= 2u);
362362
ivec::pop(os);
363-
str::connect_ivec(os, ".")
363+
str::connect(os, ".")
364364
};
365365
warn_missing(sess, "name", name);
366366
name

src/comp/driver/rustc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ fn main(args: vec[str]) {
537537
}
538538
link::output_type_exe. { parts += ~["o"]; }
539539
}
540-
let ofile = str::connect_ivec(parts, ".");
540+
let ofile = str::connect(parts, ".");
541541
compile_input(sess, cfg, ifile, ofile);
542542
}
543543
some(ofile) {
@@ -588,7 +588,7 @@ fn main(args: vec[str]) {
588588
fn rmext(filename: str) -> str {
589589
let parts = str::split(filename, '.' as u8);
590590
ivec::pop(parts);
591-
ret str::connect_ivec(parts, ".");
591+
ret str::connect(parts, ".");
592592
}
593593
ret alt config.os {
594594
session::os_macos. { rmext(rmlib(filename)) }
@@ -627,7 +627,7 @@ fn main(args: vec[str]) {
627627
if 0 != err_code {
628628
sess.err(#fmt("linking with gcc failed with code %d", err_code));
629629
sess.note(#fmt("gcc arguments: %s",
630-
str::connect_ivec(gcc_args, " ")));
630+
str::connect(gcc_args, " ")));
631631
sess.abort_if_errors();
632632
}
633633
// Clean up on Darwin

src/comp/metadata/decoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn resolve_path(path: &[ast::ident], data: @[u8]) -> [ast::def_id] {
151151
fn eq_item(data: &[u8], s: str) -> bool {
152152
ret str::eq(str::unsafe_from_bytes(data), s);
153153
}
154-
let s = str::connect_ivec(path, "::");
154+
let s = str::connect(path, "::");
155155
let md = ebmlivec::new_doc(data);
156156
let paths = ebmlivec::get_doc(md, tag_paths);
157157
let eqer = bind eq_item(_, s);

src/comp/metadata/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn add_to_index(ebml_w: &ebmlivec::writer, path: &[str],
5353
index: &mutable [entry[str]], name: &str) {
5454
let full_path = path + ~[name];
5555
index +=
56-
~[{val: str::connect_ivec(full_path, "::"),
56+
~[{val: str::connect(full_path, "::"),
5757
pos: ebml_w.writer.tell()}];
5858
}
5959

src/comp/middle/resolve.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ fn follow_import(e: &env, sc: &scopes, path: &[ident], sp: &span) ->
392392
ast::def_mod(_) | ast::def_native_mod(_) { ret dcur; }
393393
_ {
394394
e.sess.span_err(sp,
395-
str::connect_ivec(path, "::") +
395+
str::connect(path, "::") +
396396
" does not name a module.");
397397
ret none;
398398
}

src/comp/middle/trans.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5216,7 +5216,7 @@ fn load_if_immediate(cx: &@block_ctxt, v: ValueRef, t: &ty::t) -> ValueRef {
52165216

52175217
fn trans_log(lvl: int, cx: &@block_ctxt, e: &@ast::expr) -> result {
52185218
let lcx = cx.fcx.lcx;
5219-
let modname = str::connect_ivec(lcx.module_path, "::");
5219+
let modname = str::connect(lcx.module_path, "::");
52205220
let global;
52215221
if lcx.ccx.module_data.contains_key(modname) {
52225222
global = lcx.ccx.module_data.get(modname);
@@ -6078,7 +6078,7 @@ fn trans_fn(cx: @local_ctxt, sp: &span, f: &ast::_fn, llfndecl: ValueRef,
60786078
let start = time::get_time();
60796079
trans_fn_inner(cx, sp, f, llfndecl, ty_self, ty_params, id);
60806080
let end = time::get_time();
6081-
log_fn_time(cx.ccx, str::connect_ivec(cx.path, "::"), start, end);
6081+
log_fn_time(cx.ccx, str::connect(cx.path, "::"), start, end);
60826082
}
60836083

60846084
fn trans_res_ctor(cx: @local_ctxt, sp: &span, dtor: &ast::_fn,

src/comp/middle/trans_comm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn trans_spawn(cx: &@block_ctxt, dom: &ast::spawn_dom, name: &option::t[str],
7272
alt name {
7373
none. {
7474
let argss = std::ivec::map(expr_to_str, args);
75-
#fmt("%s(%s)", expr_to_str(func), str::connect_ivec(argss, ", "))
75+
#fmt("%s(%s)", expr_to_str(func), str::connect(argss, ", "))
7676
}
7777
some(n) { n }
7878
};

src/comp/middle/trans_dps.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ fn trans_binary(cx: &@block_ctxt, dest: &dest, sp: &span, op: ast::binop,
323323
fn trans_log(cx: &@block_ctxt, sp: &span, level: int, expr: &@ast::expr) ->
324324
@block_ctxt {
325325
fn trans_log_level(lcx: &@local_ctxt) -> ValueRef {
326-
let modname = str::connect_ivec(lcx.module_path, "::");
326+
let modname = str::connect(lcx.module_path, "::");
327327

328328
if lcx_ccx(lcx).module_data.contains_key(modname) {
329329
ret lcx_ccx(lcx).module_data.get(modname);

src/comp/syntax/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type path = spanned[path_];
2222

2323
fn path_name(p: &path) -> str { path_name_i(p.node.idents) }
2424

25-
fn path_name_i(idents: &[ident]) -> str { str::connect_ivec(idents, "::") }
25+
fn path_name_i(idents: &[ident]) -> str { str::connect(idents, "::") }
2626

2727
type crate_num = int;
2828
type node_id = int;

src/comp/util/ppaux.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
4949
s += "(";
5050
let strs = ~[];
5151
for a: arg in inputs { strs += ~[fn_input_to_str(cx, a)]; }
52-
s += str::connect_ivec(strs, ", ");
52+
s += str::connect(strs, ", ");
5353
s += ")";
5454
if struct(cx, output) != ty_nil {
5555
alt cf {
@@ -101,7 +101,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
101101
ty_rec(elems) {
102102
let strs: [str] = ~[];
103103
for fld: field in elems { strs += ~[field_to_str(cx, fld)]; }
104-
s += "{" + str::connect_ivec(strs, ",") + "}";
104+
s += "{" + str::connect(strs, ",") + "}";
105105
}
106106
ty_tag(id, tps) {
107107
// The user should never see this if the cname is set properly!
@@ -110,7 +110,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
110110
if ivec::len[t](tps) > 0u {
111111
let strs: [str] = ~[];
112112
for typ: t in tps { strs += ~[ty_to_str(cx, typ)]; }
113-
s += "[" + str::connect_ivec(strs, ",") + "]";
113+
s += "[" + str::connect(strs, ",") + "]";
114114
}
115115
}
116116
ty_fn(proto, inputs, output, cf, constrs) {
@@ -124,7 +124,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
124124
ty_obj(meths) {
125125
let strs = ~[];
126126
for m: method in meths { strs += ~[method_to_str(cx, m)]; }
127-
s += "obj {\n\t" + str::connect_ivec(strs, "\n\t") + "\n}";
127+
s += "obj {\n\t" + str::connect(strs, "\n\t") + "\n}";
128128
}
129129
ty_res(id, _, _) {
130130
s +=

src/lib/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export push_byte;
4343
export unshift_byte;
4444
export split;
4545
export concat;
46-
export connect_ivec;
46+
export connect;
4747
export to_upper;
4848
export safe_slice;
4949
export unsafe_from_bytes;
@@ -454,7 +454,7 @@ fn concat(v: &[str]) -> str {
454454
ret s;
455455
}
456456

457-
fn connect_ivec(v: &[str], sep: str) -> str {
457+
fn connect(v: &[str], sep: str) -> str {
458458
let s: str = "";
459459
let first: bool = true;
460460
for ss: str in v {

src/test/compiletest/runtest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ fn program_output(cx: &cx, testfile: &str, lib_path: &str, prog: &str,
315315

316316
fn make_cmdline(libpath: &str, prog: &str, args: &[str]) -> str {
317317
#fmt("%s %s %s", lib_path_cmd_prefix(libpath), prog,
318-
str::connect_ivec(args, " "))
318+
str::connect(args, " "))
319319
}
320320

321321
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
@@ -357,7 +357,7 @@ fn output_base_name(config: &config, testfile: &str) -> str {
357357
{
358358
let parts = str::split(fs::basename(testfile), '.' as u8);
359359
parts = ivec::slice(parts, 0u, ivec::len(parts) - 1u);
360-
str::connect_ivec(parts, ".")
360+
str::connect(parts, ".")
361361
};
362362
#fmt("%s%s.%s", base, filename, config.stage_id)
363363
}

src/test/stdtest/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn test_concat() {
7979
#[test]
8080
fn test_connect() {
8181
fn t(v: &[str], sep: &str, s: &str) {
82-
assert (str::eq(str::connect_ivec(v, sep), s));
82+
assert (str::eq(str::connect(v, sep), s));
8383
}
8484
t(~["you", "know", "I'm", "no", "good"], " ", "you know I'm no good");
8585
let v: [str] = ~[];

0 commit comments

Comments
 (0)