Rename str::connect_ivec to str::connect

This commit is contained in:
Brian Anderson 2011-08-11 17:56:57 -07:00
parent 21693db2a7
commit 119f43e0c7
13 changed files with 21 additions and 21 deletions

View file

@ -360,7 +360,7 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
str::split(fs::basename(output), '.' as u8);
assert (ivec::len(os) >= 2u);
ivec::pop(os);
str::connect_ivec(os, ".")
str::connect(os, ".")
};
warn_missing(sess, "name", name);
name

View file

@ -537,7 +537,7 @@ fn main(args: vec[str]) {
}
link::output_type_exe. { parts += ~["o"]; }
}
let ofile = str::connect_ivec(parts, ".");
let ofile = str::connect(parts, ".");
compile_input(sess, cfg, ifile, ofile);
}
some(ofile) {
@ -588,7 +588,7 @@ fn main(args: vec[str]) {
fn rmext(filename: str) -> str {
let parts = str::split(filename, '.' as u8);
ivec::pop(parts);
ret str::connect_ivec(parts, ".");
ret str::connect(parts, ".");
}
ret alt config.os {
session::os_macos. { rmext(rmlib(filename)) }
@ -627,7 +627,7 @@ fn main(args: vec[str]) {
if 0 != err_code {
sess.err(#fmt("linking with gcc failed with code %d", err_code));
sess.note(#fmt("gcc arguments: %s",
str::connect_ivec(gcc_args, " ")));
str::connect(gcc_args, " ")));
sess.abort_if_errors();
}
// Clean up on Darwin

View file

@ -151,7 +151,7 @@ fn resolve_path(path: &[ast::ident], data: @[u8]) -> [ast::def_id] {
fn eq_item(data: &[u8], s: str) -> bool {
ret str::eq(str::unsafe_from_bytes(data), s);
}
let s = str::connect_ivec(path, "::");
let s = str::connect(path, "::");
let md = ebmlivec::new_doc(data);
let paths = ebmlivec::get_doc(md, tag_paths);
let eqer = bind eq_item(_, s);

View file

@ -53,7 +53,7 @@ fn add_to_index(ebml_w: &ebmlivec::writer, path: &[str],
index: &mutable [entry[str]], name: &str) {
let full_path = path + ~[name];
index +=
~[{val: str::connect_ivec(full_path, "::"),
~[{val: str::connect(full_path, "::"),
pos: ebml_w.writer.tell()}];
}

View file

@ -392,7 +392,7 @@ fn follow_import(e: &env, sc: &scopes, path: &[ident], sp: &span) ->
ast::def_mod(_) | ast::def_native_mod(_) { ret dcur; }
_ {
e.sess.span_err(sp,
str::connect_ivec(path, "::") +
str::connect(path, "::") +
" does not name a module.");
ret none;
}

View file

@ -5216,7 +5216,7 @@ fn load_if_immediate(cx: &@block_ctxt, v: ValueRef, t: &ty::t) -> ValueRef {
fn trans_log(lvl: int, cx: &@block_ctxt, e: &@ast::expr) -> result {
let lcx = cx.fcx.lcx;
let modname = str::connect_ivec(lcx.module_path, "::");
let modname = str::connect(lcx.module_path, "::");
let global;
if lcx.ccx.module_data.contains_key(modname) {
global = lcx.ccx.module_data.get(modname);
@ -6078,7 +6078,7 @@ fn trans_fn(cx: @local_ctxt, sp: &span, f: &ast::_fn, llfndecl: ValueRef,
let start = time::get_time();
trans_fn_inner(cx, sp, f, llfndecl, ty_self, ty_params, id);
let end = time::get_time();
log_fn_time(cx.ccx, str::connect_ivec(cx.path, "::"), start, end);
log_fn_time(cx.ccx, str::connect(cx.path, "::"), start, end);
}
fn trans_res_ctor(cx: @local_ctxt, sp: &span, dtor: &ast::_fn,

View file

@ -72,7 +72,7 @@ fn trans_spawn(cx: &@block_ctxt, dom: &ast::spawn_dom, name: &option::t[str],
alt name {
none. {
let argss = std::ivec::map(expr_to_str, args);
#fmt("%s(%s)", expr_to_str(func), str::connect_ivec(argss, ", "))
#fmt("%s(%s)", expr_to_str(func), str::connect(argss, ", "))
}
some(n) { n }
};

View file

@ -323,7 +323,7 @@ fn trans_binary(cx: &@block_ctxt, dest: &dest, sp: &span, op: ast::binop,
fn trans_log(cx: &@block_ctxt, sp: &span, level: int, expr: &@ast::expr) ->
@block_ctxt {
fn trans_log_level(lcx: &@local_ctxt) -> ValueRef {
let modname = str::connect_ivec(lcx.module_path, "::");
let modname = str::connect(lcx.module_path, "::");
if lcx_ccx(lcx).module_data.contains_key(modname) {
ret lcx_ccx(lcx).module_data.get(modname);

View file

@ -22,7 +22,7 @@ type path = spanned[path_];
fn path_name(p: &path) -> str { path_name_i(p.node.idents) }
fn path_name_i(idents: &[ident]) -> str { str::connect_ivec(idents, "::") }
fn path_name_i(idents: &[ident]) -> str { str::connect(idents, "::") }
type crate_num = int;
type node_id = int;

View file

@ -49,7 +49,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
s += "(";
let strs = ~[];
for a: arg in inputs { strs += ~[fn_input_to_str(cx, a)]; }
s += str::connect_ivec(strs, ", ");
s += str::connect(strs, ", ");
s += ")";
if struct(cx, output) != ty_nil {
alt cf {
@ -101,7 +101,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
ty_rec(elems) {
let strs: [str] = ~[];
for fld: field in elems { strs += ~[field_to_str(cx, fld)]; }
s += "{" + str::connect_ivec(strs, ",") + "}";
s += "{" + str::connect(strs, ",") + "}";
}
ty_tag(id, tps) {
// 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 {
if ivec::len[t](tps) > 0u {
let strs: [str] = ~[];
for typ: t in tps { strs += ~[ty_to_str(cx, typ)]; }
s += "[" + str::connect_ivec(strs, ",") + "]";
s += "[" + str::connect(strs, ",") + "]";
}
}
ty_fn(proto, inputs, output, cf, constrs) {
@ -124,7 +124,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
ty_obj(meths) {
let strs = ~[];
for m: method in meths { strs += ~[method_to_str(cx, m)]; }
s += "obj {\n\t" + str::connect_ivec(strs, "\n\t") + "\n}";
s += "obj {\n\t" + str::connect(strs, "\n\t") + "\n}";
}
ty_res(id, _, _) {
s +=

View file

@ -43,7 +43,7 @@ export push_byte;
export unshift_byte;
export split;
export concat;
export connect_ivec;
export connect;
export to_upper;
export safe_slice;
export unsafe_from_bytes;
@ -454,7 +454,7 @@ fn concat(v: &[str]) -> str {
ret s;
}
fn connect_ivec(v: &[str], sep: str) -> str {
fn connect(v: &[str], sep: str) -> str {
let s: str = "";
let first: bool = true;
for ss: str in v {

View file

@ -315,7 +315,7 @@ fn program_output(cx: &cx, testfile: &str, lib_path: &str, prog: &str,
fn make_cmdline(libpath: &str, prog: &str, args: &[str]) -> str {
#fmt("%s %s %s", lib_path_cmd_prefix(libpath), prog,
str::connect_ivec(args, " "))
str::connect(args, " "))
}
// 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 {
{
let parts = str::split(fs::basename(testfile), '.' as u8);
parts = ivec::slice(parts, 0u, ivec::len(parts) - 1u);
str::connect_ivec(parts, ".")
str::connect(parts, ".")
};
#fmt("%s%s.%s", base, filename, config.stage_id)
}

View file

@ -79,7 +79,7 @@ fn test_concat() {
#[test]
fn test_connect() {
fn t(v: &[str], sep: &str, s: &str) {
assert (str::eq(str::connect_ivec(v, sep), s));
assert (str::eq(str::connect(v, sep), s));
}
t(~["you", "know", "I'm", "no", "good"], " ", "you know I'm no good");
let v: [str] = ~[];