Skip to content

Commit 1f2f9fa

Browse files
committed
---
yaml --- r: 63169 b: refs/heads/snap-stage3 c: ccd0ac5 h: refs/heads/master i: 63167: d53b7b8 v: v3
1 parent 1fbb79f commit 1f2f9fa

File tree

39 files changed

+63
-87
lines changed

39 files changed

+63
-87
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5a711ea7c317ea90f03d5118dbb2e19e1622bc29
4+
refs/heads/snap-stage3: ccd0ac59e9a918f3c2a174e31213286dc6867d37
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
244244
None => copy *config
245245
};
246246
let config = &mut config;
247-
let cmds = str::connect(props.debugger_cmds, "\n");
247+
let cmds = props.debugger_cmds.connect("\n");
248248
let check_lines = copy props.check_lines;
249249

250250
// compile test file (it shoud have 'compile-flags:-g' in the header)
@@ -645,13 +645,13 @@ fn program_output(config: &config, testfile: &Path, lib_path: &str, prog: ~str,
645645
#[cfg(target_os = "macos")]
646646
#[cfg(target_os = "freebsd")]
647647
fn make_cmdline(_libpath: &str, prog: &str, args: &[~str]) -> ~str {
648-
fmt!("%s %s", prog, str::connect(args, " "))
648+
fmt!("%s %s", prog, args.connect(" "))
649649
}
650650

651651
#[cfg(target_os = "win32")]
652652
fn make_cmdline(libpath: &str, prog: &str, args: &[~str]) -> ~str {
653653
fmt!("%s %s %s", lib_path_cmd_prefix(libpath), prog,
654-
str::connect(args, " "))
654+
args.connect(" "))
655655
}
656656

657657
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line

branches/snap-stage3/src/libextra/getopts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,14 @@ pub mod groups {
648648

649649
// FIXME: #5516
650650
// wrapped description
651-
row += str::connect(desc_rows, desc_sep);
651+
row += desc_rows.connect(desc_sep);
652652

653653
row
654654
});
655655

656656
return str::to_owned(brief) +
657657
"\n\nOptions:\n" +
658-
str::connect(rows, "\n") +
658+
rows.connect("\n") +
659659
"\n\n";
660660
}
661661
} // end groups module

branches/snap-stage3/src/libextra/net_url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ pub fn query_to_str(query: &Query) -> ~str {
354354
}
355355
}
356356
}
357-
return str::connect(strvec, "&");
357+
return strvec.connect("&");
358358
}
359359

360360
// returns the scheme and the rest of the url, or a parsing error

branches/snap-stage3/src/libextra/num/bigint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,10 @@ impl ToStrRadix for BigUint {
520520

521521
fn fill_concat(v: &[BigDigit], radix: uint, l: uint) -> ~str {
522522
if v.is_empty() { return ~"0" }
523-
let s = str::concat(vec::reversed(v).map(|n| {
523+
let s = vec::reversed(v).map(|n| {
524524
let s = uint::to_str_radix(*n as uint, radix);
525525
str::from_chars(vec::from_elem(l - s.len(), '0')) + s
526-
}));
526+
}).concat();
527527
s.trim_left_chars(['0']).to_owned()
528528
}
529529
}

branches/snap-stage3/src/libextra/semver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ impl ToStr for Version {
8181
let s = if self.pre.is_empty() {
8282
s
8383
} else {
84-
s + "-" + str::connect(self.pre.map(|i| i.to_str()), ".")
84+
s + "-" + self.pre.map(|i| i.to_str()).connect(".")
8585
};
8686
if self.build.is_empty() {
8787
s
8888
} else {
89-
s + "+" + str::connect(self.build.map(|i| i.to_str()), ".")
89+
s + "+" + self.build.map(|i| i.to_str()).connect(".")
9090
}
9191
}
9292
}

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ pub mod write {
394394
sess.err(fmt!("building with `%s` failed with code %d",
395395
cc_prog, prog.status));
396396
sess.note(fmt!("%s arguments: %s",
397-
cc_prog, str::connect(cc_args, " ")));
397+
cc_prog, cc_args.connect(" ")));
398398
sess.note(str::from_bytes(prog.error + prog.output));
399399
sess.abort_if_errors();
400400
}
@@ -809,14 +809,14 @@ pub fn link_binary(sess: Session,
809809

810810
debug!("output: %s", output.to_str());
811811
let cc_args = link_args(sess, obj_filename, out_filename, lm);
812-
debug!("%s link args: %s", cc_prog, str::connect(cc_args, " "));
812+
debug!("%s link args: %s", cc_prog, cc_args.connect(" "));
813813
// We run 'cc' here
814814
let prog = run::process_output(cc_prog, cc_args);
815815
if 0 != prog.status {
816816
sess.err(fmt!("linking with `%s` failed with code %d",
817817
cc_prog, prog.status));
818818
sess.note(fmt!("%s arguments: %s",
819-
cc_prog, str::connect(cc_args, " ")));
819+
cc_prog, cc_args.connect(" ")));
820820
sess.note(str::from_bytes(prog.error + prog.output));
821821
sess.abort_if_errors();
822822
}

branches/snap-stage3/src/librustc/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ pub fn compile_rest(sess: Session,
328328

329329
let outputs = outputs.get_ref();
330330
if (sess.opts.debugging_opts & session::print_link_args) != 0 {
331-
io::println(str::connect(link::link_args(sess,
332-
&outputs.obj_filename, &outputs.out_filename, link_meta), " "));
331+
io::println(link::link_args(sess, &outputs.obj_filename,
332+
&outputs.out_filename, link_meta).connect(" "));
333333
}
334334

335335
// NB: Android hack

branches/snap-stage3/src/librustc/middle/trans/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub fn trans_inline_asm(bcx: block, ia: &ast::inline_asm) -> block {
8787
revoke_clean(bcx, *c);
8888
}
8989

90-
let mut constraints = str::connect(constraints, ",");
90+
let mut constraints = constraints.connect(",");
9191

9292
let mut clobbers = getClobbers();
9393
if *ia.clobbers != ~"" && clobbers != ~"" {

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ pub fn trans_enum_variant(ccx: @CrateContext,
19951995

19961996
debug!("trans_enum_variant: name=%s tps=%s repr=%? enum_ty=%s",
19971997
unsafe { str::raw::from_c_str(llvm::LLVMGetValueName(llfndecl)) },
1998-
~"[" + str::connect(ty_param_substs.map(|&t| ty_to_str(ccx.tcx, t)), ", ") + "]",
1998+
~"[" + ty_param_substs.map(|&t| ty_to_str(ccx.tcx.connect(t)), ", ") + "]",
19991999
repr, ty_to_str(ccx.tcx, enum_ty));
20002000
20012001
adt::trans_start_init(bcx, repr, fcx.llretptr.get(), disr);

branches/snap-stage3/src/librustc/middle/trans/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub fn Invoke(cx: block,
192192
terminate(cx, "Invoke");
193193
debug!("Invoke(%s with arguments (%s))",
194194
val_str(cx.ccx().tn, Fn),
195-
str::connect(vec::map(Args, |a| val_str(cx.ccx().tn,
195+
vec::map(Args.connect(|a| val_str(cx.ccx().tn,
196196
*a).to_owned()),
197197
", "));
198198
unsafe {

branches/snap-stage3/src/librustc/middle/trans/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ pub fn node_id_type_params(bcx: block, id: ast::node_id) -> ~[ty::t] {
14831483
if !params.all(|t| !ty::type_needs_infer(*t)) {
14841484
bcx.sess().bug(
14851485
fmt!("Type parameters for node %d include inference types: %s",
1486-
id, str::connect(params.map(|t| bcx.ty_to_str(*t)), ",")));
1486+
id, params.map(|t| bcx.ty_to_str(*t)).connect(",")));
14871487
}
14881488

14891489
match bcx.fcx.param_substs {

branches/snap-stage3/src/librustc/middle/typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,7 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
18791879
} else {
18801880
"s"
18811881
},
1882-
str::connect(missing_fields, ", ")));
1882+
missing_fields.connect(", ")));
18831883
}
18841884
}
18851885

branches/snap-stage3/src/librustc/middle/typeck/infer/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Env {
100100
return match search_mod(self, &self.crate.node.module, 0, names) {
101101
Some(id) => id,
102102
None => {
103-
fail!("No item found: `%s`", str::connect(names, "::"));
103+
fail!("No item found: `%s`", names.connect("::"));
104104
}
105105
};
106106

branches/snap-stage3/src/librustc/middle/typeck/infer/to_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl InferStr for ty::t {
3535
impl InferStr for FnSig {
3636
fn inf_str(&self, cx: &InferCtxt) -> ~str {
3737
fmt!("(%s) -> %s",
38-
str::connect(self.inputs.map(|a| a.inf_str(cx)), ", "),
38+
self.inputs.map(|a| a.inf_str(cx)).connect(", "),
3939
self.output.inf_str(cx))
4040
}
4141
}

branches/snap-stage3/src/librustc/util/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub fn local_rhs_span(l: @ast::local, def: span) -> span {
111111

112112
pub fn pluralize(n: uint, s: ~str) -> ~str {
113113
if n == 1 { s }
114-
else { str::concat([s, ~"s"]) }
114+
else { fmt!("%ss", s) }
115115
}
116116

117117
// A set of node IDs (used to keep track of which node IDs are for statements)

branches/snap-stage3/src/librustc/util/ppaux.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ pub fn vstore_ty_to_str(cx: ctxt, mt: &mt, vs: ty::vstore) -> ~str {
281281

282282
pub fn tys_to_str(cx: ctxt, ts: &[t]) -> ~str {
283283
let tstrs = ts.map(|t| ty_to_str(cx, *t));
284-
fmt!("(%s)", str::connect(tstrs, ", "))
284+
fmt!("(%s)", tstrs.connect(", "))
285285
}
286286

287287
pub fn fn_sig_to_str(cx: ctxt, typ: &ty::FnSig) -> ~str {
@@ -369,7 +369,7 @@ pub fn ty_to_str(cx: ctxt, typ: t) -> ~str {
369369
fn push_sig_to_str(cx: ctxt, s: &mut ~str, sig: &ty::FnSig) {
370370
s.push_char('(');
371371
let strs = sig.inputs.map(|a| fn_input_to_str(cx, *a));
372-
s.push_str(str::connect(strs, ", "));
372+
s.push_str(strs.connect(", "));
373373
s.push_char(')');
374374
if ty::get(sig.output).sty != ty_nil {
375375
s.push_str(" -> ");
@@ -420,7 +420,7 @@ pub fn ty_to_str(cx: ctxt, typ: t) -> ~str {
420420
ty_type => ~"type",
421421
ty_tup(ref elems) => {
422422
let strs = elems.map(|elem| ty_to_str(cx, *elem));
423-
~"(" + str::connect(strs, ",") + ")"
423+
~"(" + strs.connect(",") + ")"
424424
}
425425
ty_closure(ref f) => {
426426
closure_to_str(cx, f)
@@ -477,7 +477,7 @@ pub fn parameterized(cx: ctxt,
477477

478478
if tps.len() > 0u {
479479
let strs = vec::map(tps, |t| ty_to_str(cx, *t));
480-
fmt!("%s%s<%s>", base, r_str, str::connect(strs, ","))
480+
fmt!("%s%s<%s>", base, r_str, strs.connect(","))
481481
} else {
482482
fmt!("%s%s", base, r_str)
483483
}
@@ -515,7 +515,7 @@ impl<T:Repr> Repr for ~T {
515515
*/
516516

517517
fn repr_vec<T:Repr>(tcx: ctxt, v: &[T]) -> ~str {
518-
fmt!("[%s]", str::connect(v.map(|t| t.repr(tcx)), ","))
518+
fmt!("[%s]", v.map(|t| t.repr(tcx)).connect(","))
519519
}
520520

521521
impl<'self, T:Repr> Repr for &'self [T] {
@@ -569,7 +569,7 @@ impl Repr for ty::ParamBounds {
569569
for self.trait_bounds.each |t| {
570570
res.push(t.repr(tcx));
571571
}
572-
str::connect(res, "+")
572+
res.connect("+")
573573
}
574574
}
575575

@@ -787,7 +787,7 @@ impl UserString for ty::BuiltinBounds {
787787
for self.each |bb| {
788788
result.push(bb.user_string(tcx));
789789
}
790-
str::connect(result, "+")
790+
result.connect("+")
791791
}
792792
}
793793
}

branches/snap-stage3/src/librustdoc/attr_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn parse_desc(attrs: ~[ast::attribute]) -> Option<~str> {
5353
if doc_strs.is_empty() {
5454
None
5555
} else {
56-
Some(str::connect(doc_strs, "\n"))
56+
Some(doc_strs.connect("\n"))
5757
}
5858
}
5959

branches/snap-stage3/src/librustdoc/markdown_pass.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pub fn header_kind(doc: doc::ItemTag) -> ~str {
173173
}
174174

175175
pub fn header_name(doc: doc::ItemTag) -> ~str {
176-
let fullpath = str::connect(doc.path() + [doc.name()], "::");
176+
let fullpath = (doc.path() + [doc.name()]).connect("::");
177177
match &doc {
178178
&doc::ModTag(_) if doc.id() != syntax::ast::crate_node_id => {
179179
fullpath
@@ -414,7 +414,7 @@ fn code_block_indent(s: ~str) -> ~str {
414414
for str::each_line_any(s) |line| {
415415
indented.push(fmt!(" %s", line));
416416
}
417-
str::connect(indented, "\n")
417+
indented.connect("\n")
418418
}
419419

420420
fn write_const(
@@ -476,7 +476,7 @@ fn list_item_indent(item: &str) -> ~str {
476476
// separate markdown elements within `*` lists must be indented by four
477477
// spaces, or they will escape the list context. indenting everything
478478
// seems fine though.
479-
str::connect_slices(indented, "\n ")
479+
indented.connect("\n ")
480480
}
481481

482482
fn write_trait(ctxt: &Ctxt, doc: doc::TraitDoc) {

branches/snap-stage3/src/librustdoc/markdown_writer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ fn pandoc_writer(
107107
use core::io::WriterUtil;
108108
109109
debug!("pandoc cmd: %s", pandoc_cmd);
110-
debug!("pandoc args: %s", str::connect(pandoc_args, " "));
110+
debug!("pandoc args: %s", pandoc_args.connect(" "));
111111

112112
let mut proc = run::Process::new(pandoc_cmd, pandoc_args, run::ProcessOptions::new());
113113

@@ -164,7 +164,7 @@ pub fn make_filename(
164164
}
165165
}
166166
doc::ItemPage(doc) => {
167-
str::connect(doc.path() + [doc.name()], "_")
167+
(doc.path() + [doc.name()]).connect("_")
168168
}
169169
}
170170
};

branches/snap-stage3/src/librustdoc/unindent_pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn unindent(s: &str) -> ~str {
8787
line.slice(min_indent, line.len()).to_owned()
8888
}
8989
};
90-
str::connect(unindented, "\n")
90+
unindented.connect("\n")
9191
} else {
9292
s.to_str()
9393
}

branches/snap-stage3/src/librusti/rusti.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ fn run_cmd(repl: &mut Repl, _in: @io::Reader, _out: @io::Writer,
308308
println("no crates loaded");
309309
} else {
310310
println(fmt!("crates loaded: %s",
311-
str::connect(loaded_crates, ", ")));
311+
loaded_crates.connect(", ")));
312312
}
313313
}
314314
~"{" => {

branches/snap-stage3/src/librustpkg/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ pub fn compile_input(ctxt: &Ctx,
207207

208208
let binary = @(copy os::args()[0]);
209209

210-
debug!("flags: %s", str::connect(flags, " "));
211-
debug!("cfgs: %s", str::connect(cfgs, " "));
210+
debug!("flags: %s", flags.connect(" "));
211+
debug!("cfgs: %s", cfgs.connect(" "));
212212
debug!("compile_input's sysroot = %?", ctxt.sysroot_opt);
213213

214214
let crate_type = match what {

branches/snap-stage3/src/libstd/path.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use iterator::IteratorUtil;
2222
use libc;
2323
use option::{None, Option, Some};
2424
use str;
25-
use str::StrSlice;
25+
use str::{StrSlice, StrVector};
2626
use to_str::ToStr;
2727
use ascii::{AsciiCast, AsciiStr};
2828
use old_iter::BaseIter;
@@ -442,7 +442,7 @@ impl ToStr for PosixPath {
442442
if self.is_absolute {
443443
s += "/";
444444
}
445-
s + str::connect(self.components, "/")
445+
s + self.components.connect("/")
446446
}
447447
}
448448

@@ -629,7 +629,7 @@ impl ToStr for WindowsPath {
629629
if self.is_absolute {
630630
s += "\\";
631631
}
632-
s + str::connect(self.components, "\\")
632+
s + self.components.connect("\\")
633633
}
634634
}
635635

0 commit comments

Comments
 (0)