Skip to content

Commit 6bf054f

Browse files
committed
---
yaml --- r: 235376 b: refs/heads/stable c: 93ddee6 h: refs/heads/master v: v3
1 parent 58905d4 commit 6bf054f

File tree

40 files changed

+88
-88
lines changed

40 files changed

+88
-88
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 29c0c956bf8ba9d6cdb1723d40685514bc9c17ef
32+
refs/heads/stable: 93ddee6cee6816843035575ddf0bf0309021ebc5
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/compiletest/runtest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
344344
check_lines,
345345
breakpoint_lines
346346
} = parse_debugger_commands(testfile, "gdb");
347-
let mut cmds = commands.connect("\n");
347+
let mut cmds = commands.join("\n");
348348

349349
// compile test file (it should have 'compile-flags:-g' in the header)
350350
let compiler_run_result = compile_test(config, props, testfile);
@@ -799,7 +799,7 @@ fn cleanup_debug_info_options(options: &Option<String>) -> Option<String> {
799799
split_maybe_args(options).into_iter()
800800
.filter(|x| !options_to_remove.contains(x))
801801
.collect::<Vec<String>>()
802-
.connect(" ");
802+
.join(" ");
803803
Some(new_options)
804804
}
805805

@@ -1412,15 +1412,15 @@ fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
14121412

14131413
// Linux and mac don't require adjusting the library search path
14141414
if cfg!(unix) {
1415-
format!("{} {}", prog, args.connect(" "))
1415+
format!("{} {}", prog, args.join(" "))
14161416
} else {
14171417
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
14181418
// for diagnostic purposes
14191419
fn lib_path_cmd_prefix(path: &str) -> String {
14201420
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
14211421
}
14221422

1423-
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
1423+
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.join(" "))
14241424
}
14251425
}
14261426

branches/stable/src/libcollectionstest/slice.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -606,22 +606,22 @@ fn test_concat() {
606606
assert_eq!(d, [1, 2, 3]);
607607

608608
let v: &[&[_]] = &[&[1], &[2, 3]];
609-
assert_eq!(v.connect(&0), [1, 0, 2, 3]);
609+
assert_eq!(v.join(&0), [1, 0, 2, 3]);
610610
let v: &[&[_]] = &[&[1], &[2], &[3]];
611-
assert_eq!(v.connect(&0), [1, 0, 2, 0, 3]);
611+
assert_eq!(v.join(&0), [1, 0, 2, 0, 3]);
612612
}
613613

614614
#[test]
615-
fn test_connect() {
615+
fn test_join() {
616616
let v: [Vec<i32>; 0] = [];
617-
assert_eq!(v.connect(&0), []);
618-
assert_eq!([vec![1], vec![2, 3]].connect(&0), [1, 0, 2, 3]);
619-
assert_eq!([vec![1], vec![2], vec![3]].connect(&0), [1, 0, 2, 0, 3]);
617+
assert_eq!(v.join(&0), []);
618+
assert_eq!([vec![1], vec![2, 3]].join(&0), [1, 0, 2, 3]);
619+
assert_eq!([vec![1], vec![2], vec![3]].join(&0), [1, 0, 2, 0, 3]);
620620

621621
let v: [&[_]; 2] = [&[1], &[2, 3]];
622-
assert_eq!(v.connect(&0), [1, 0, 2, 3]);
622+
assert_eq!(v.join(&0), [1, 0, 2, 3]);
623623
let v: [&[_]; 3] = [&[1], &[2], &[3]];
624-
assert_eq!(v.connect(&0), [1, 0, 2, 0, 3]);
624+
assert_eq!(v.join(&0), [1, 0, 2, 0, 3]);
625625
}
626626

627627
#[test]
@@ -1339,11 +1339,11 @@ mod bench {
13391339
}
13401340

13411341
#[bench]
1342-
fn connect(b: &mut Bencher) {
1342+
fn join(b: &mut Bencher) {
13431343
let xss: Vec<Vec<i32>> =
13441344
(0..100).map(|i| (0..i).collect()).collect();
13451345
b.iter(|| {
1346-
xss.connect(&0)
1346+
xss.join(&0)
13471347
});
13481348
}
13491349

branches/stable/src/libcollectionstest/str.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,32 +158,32 @@ fn test_concat_for_different_lengths() {
158158
test_concat!("abc", ["", "a", "bc"]);
159159
}
160160

161-
macro_rules! test_connect {
161+
macro_rules! test_join {
162162
($expected: expr, $string: expr, $delim: expr) => {
163163
{
164-
let s = $string.connect($delim);
164+
let s = $string.join($delim);
165165
assert_eq!($expected, s);
166166
}
167167
}
168168
}
169169

170170
#[test]
171-
fn test_connect_for_different_types() {
172-
test_connect!("a-b", ["a", "b"], "-");
171+
fn test_join_for_different_types() {
172+
test_join!("a-b", ["a", "b"], "-");
173173
let hyphen = "-".to_string();
174-
test_connect!("a-b", [s("a"), s("b")], &*hyphen);
175-
test_connect!("a-b", vec!["a", "b"], &*hyphen);
176-
test_connect!("a-b", &*vec!["a", "b"], "-");
177-
test_connect!("a-b", vec![s("a"), s("b")], "-");
174+
test_join!("a-b", [s("a"), s("b")], &*hyphen);
175+
test_join!("a-b", vec!["a", "b"], &*hyphen);
176+
test_join!("a-b", &*vec!["a", "b"], "-");
177+
test_join!("a-b", vec![s("a"), s("b")], "-");
178178
}
179179

180180
#[test]
181-
fn test_connect_for_different_lengths() {
181+
fn test_join_for_different_lengths() {
182182
let empty: &[&str] = &[];
183-
test_connect!("", empty, "-");
184-
test_connect!("a", ["a"], "-");
185-
test_connect!("a-b", ["a", "b"], "-");
186-
test_connect!("-a-bc", ["", "a", "bc"], "-");
183+
test_join!("", empty, "-");
184+
test_join!("a", ["a"], "-");
185+
test_join!("a-b", ["a", "b"], "-");
186+
test_join!("-a-bc", ["", "a", "bc"], "-");
187187
}
188188

189189
#[test]
@@ -2081,12 +2081,12 @@ mod bench {
20812081
}
20822082

20832083
#[bench]
2084-
fn bench_connect(b: &mut Bencher) {
2084+
fn bench_join(b: &mut Bencher) {
20852085
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
20862086
let sep = "→";
20872087
let v = vec![s, s, s, s, s, s, s, s, s, s];
20882088
b.iter(|| {
2089-
assert_eq!(v.connect(sep).len(), s.len() * 10 + sep.len() * 9);
2089+
assert_eq!(v.join(sep).len(), s.len() * 10 + sep.len() * 9);
20902090
})
20912091
}
20922092

branches/stable/src/libgetopts/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,13 +784,13 @@ pub fn usage(brief: &str, opts: &[OptGroup]) -> String {
784784

785785
// FIXME: #5516 should be graphemes not codepoints
786786
// wrapped description
787-
row.push_str(&desc_rows.connect(&desc_sep[..]));
787+
row.push_str(&desc_rows.join(&desc_sep[..]));
788788

789789
row
790790
});
791791

792792
format!("{}\n\nOptions:\n{}\n", brief,
793-
rows.collect::<Vec<String>>().connect("\n"))
793+
rows.collect::<Vec<String>>().join("\n"))
794794
}
795795

796796
fn format_option(opt: &OptGroup) -> String {
@@ -836,7 +836,7 @@ pub fn short_usage(program_name: &str, opts: &[OptGroup]) -> String {
836836
line.push_str(&opts.iter()
837837
.map(format_option)
838838
.collect::<Vec<String>>()
839-
.connect(" ")[..]);
839+
.join(" ")[..]);
840840
line
841841
}
842842

branches/stable/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ fn encode_dylib_dependency_formats(rbml_w: &mut Encoder, ecx: &EncodeContext) {
20282028
cstore::RequireStatic => "s",
20292029
})).to_string())
20302030
}).collect::<Vec<String>>();
2031-
rbml_w.wr_tagged_str(tag, &s.connect(","));
2031+
rbml_w.wr_tagged_str(tag, &s.join(","));
20322032
}
20332033
None => {
20342034
rbml_w.wr_tagged_str(tag, "");

branches/stable/src/librustc/middle/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
10981098

10991099
pub fn tys_to_string(&self, ts: &[Ty<'tcx>]) -> String {
11001100
let tstrs: Vec<String> = ts.iter().map(|t| self.ty_to_string(*t)).collect();
1101-
format!("({})", tstrs.connect(", "))
1101+
format!("({})", tstrs.join(", "))
11021102
}
11031103

11041104
pub fn trait_ref_to_string(&self, t: &ty::TraitRef<'tcx>) -> String {

branches/stable/src/librustc_driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ fn write_out_deps(sess: &Session,
843843
let mut file = try!(fs::File::create(&deps_filename));
844844
for path in &out_filenames {
845845
try!(write!(&mut file,
846-
"{}: {}\n\n", path.display(), files.connect(" ")));
846+
"{}: {}\n\n", path.display(), files.join(" ")));
847847
}
848848
Ok(())
849849
})();

branches/stable/src/librustc_driver/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ Available lint options:
606606
for (name, to) in lints {
607607
let name = name.to_lowercase().replace("_", "-");
608608
let desc = to.into_iter().map(|x| x.as_str().replace("_", "-"))
609-
.collect::<Vec<String>>().connect(", ");
609+
.collect::<Vec<String>>().join(", ");
610610
println!(" {} {}",
611611
padded(&name[..]), desc);
612612
}

branches/stable/src/librustc_driver/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl UserIdentifiedItem {
378378
fn reconstructed_input(&self) -> String {
379379
match *self {
380380
ItemViaNode(node_id) => node_id.to_string(),
381-
ItemViaPath(ref parts) => parts.connect("::"),
381+
ItemViaPath(ref parts) => parts.join("::"),
382382
}
383383
}
384384

branches/stable/src/librustc_driver/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl<'a, 'tcx> Env<'a, 'tcx> {
178178
return match search_mod(self, &self.infcx.tcx.map.krate().module, 0, names) {
179179
Some(id) => id,
180180
None => {
181-
panic!("no item found: `{}`", names.connect("::"));
181+
panic!("no item found: `{}`", names.join("::"));
182182
}
183183
};
184184

branches/stable/src/librustc_lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ impl NonSnakeCase {
923923
}
924924
words.push(buf);
925925
}
926-
words.connect("_")
926+
words.join("_")
927927
}
928928

929929
fn check_snake_case(&self, cx: &Context, sort: &str, name: &str, span: Option<Span>) {

branches/stable/src/librustc_trans/trans/_match.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ fn compile_guard<'a, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
936936
bcx.to_str(),
937937
guard_expr,
938938
m,
939-
vals.iter().map(|v| bcx.val_to_string(*v)).collect::<Vec<_>>().connect(", "));
939+
vals.iter().map(|v| bcx.val_to_string(*v)).collect::<Vec<_>>().join(", "));
940940
let _indenter = indenter();
941941

942942
let mut bcx = insert_lllocals(bcx, &data.bindings_map, None);
@@ -981,7 +981,7 @@ fn compile_submatch<'a, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
981981
debug!("compile_submatch(bcx={}, m={:?}, vals=[{}])",
982982
bcx.to_str(),
983983
m,
984-
vals.iter().map(|v| bcx.val_to_string(*v)).collect::<Vec<_>>().connect(", "));
984+
vals.iter().map(|v| bcx.val_to_string(*v)).collect::<Vec<_>>().join(", "));
985985
let _indenter = indenter();
986986
let _icx = push_ctxt("match::compile_submatch");
987987
let mut bcx = bcx;

branches/stable/src/librustc_trans/trans/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
9292
.chain(arch_clobbers.iter()
9393
.map(|s| s.to_string()))
9494
.collect::<Vec<String>>()
95-
.connect(",");
95+
.join(",");
9696

9797
debug!("Asm Constraints: {}", &all_constraints[..]);
9898

branches/stable/src/librustc_trans/trans/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pub fn Invoke(cx: Block,
148148
terminate(cx, "Invoke");
149149
debug!("Invoke({} with arguments ({}))",
150150
cx.val_to_string(fn_),
151-
args.iter().map(|a| cx.val_to_string(*a)).collect::<Vec<String>>().connect(", "));
151+
args.iter().map(|a| cx.val_to_string(*a)).collect::<Vec<String>>().join(", "));
152152
debug_loc.apply(cx.fcx);
153153
B(cx).invoke(fn_, args, then, catch, attributes)
154154
}

branches/stable/src/librustc_trans/trans/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
167167
args.iter()
168168
.map(|&v| self.ccx.tn().val_to_string(v))
169169
.collect::<Vec<String>>()
170-
.connect(", "));
170+
.join(", "));
171171

172172
unsafe {
173173
let v = llvm::LLVMBuildInvoke(self.llbuilder,
@@ -809,7 +809,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
809809
args.iter()
810810
.map(|&v| self.ccx.tn().val_to_string(v))
811811
.collect::<Vec<String>>()
812-
.connect(", "));
812+
.join(", "));
813813

814814
unsafe {
815815
let v = llvm::LLVMBuildCall(self.llbuilder, llfn, args.as_ptr(),

branches/stable/src/librustc_trans/trans/debuginfo/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ impl<'tcx> EnumMemberDescriptionFactory<'tcx> {
14431443
let discrfield = discrfield.iter()
14441444
.skip(1)
14451445
.map(|x| x.to_string())
1446-
.collect::<Vec<_>>().connect("$");
1446+
.collect::<Vec<_>>().join("$");
14471447
let union_member_name = format!("RUST$ENCODED$ENUM${}${}",
14481448
discrfield,
14491449
null_variant_name);

branches/stable/src/librustc_trans/trans/llrepr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub trait LlvmRepr {
1919
impl<T:LlvmRepr> LlvmRepr for [T] {
2020
fn llrepr(&self, ccx: &CrateContext) -> String {
2121
let reprs: Vec<String> = self.iter().map(|t| t.llrepr(ccx)).collect();
22-
format!("[{}]", reprs.connect(","))
22+
format!("[{}]", reprs.join(","))
2323
}
2424
}
2525

branches/stable/src/librustc_trans/trans/type_.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ impl TypeNames {
322322

323323
pub fn types_to_str(&self, tys: &[Type]) -> String {
324324
let strs: Vec<String> = tys.iter().map(|t| self.type_to_string(*t)).collect();
325-
format!("[{}]", strs.connect(","))
325+
format!("[{}]", strs.join(","))
326326
}
327327

328328
pub fn val_to_string(&self, val: ValueRef) -> String {

branches/stable/src/librustc_trans/trans/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ fn llvm_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
457457
let tstr = if strings.is_empty() {
458458
base
459459
} else {
460-
format!("{}<{}>", base, strings.connect(", "))
460+
format!("{}<{}>", base, strings.join(", "))
461461
};
462462

463463
if did.krate == 0 {

branches/stable/src/librustc_typeck/check/method/suggest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub fn report_error<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
134134
p.self_ty(),
135135
p))
136136
.collect::<Vec<_>>()
137-
.connect(", ");
137+
.join(", ");
138138
cx.sess.fileline_note(
139139
span,
140140
&format!("the method `{}` exists but the \

branches/stable/src/librustc_typeck/check/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ fn check_impl_items_against_trait<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
10021002
"not all trait items implemented, missing: `{}`",
10031003
missing_items.iter()
10041004
.map(<ast::Name>::as_str)
1005-
.collect::<Vec<_>>().connect("`, `"))
1005+
.collect::<Vec<_>>().join("`, `"))
10061006
}
10071007

10081008
if !invalidated_items.is_empty() {
@@ -1013,7 +1013,7 @@ fn check_impl_items_against_trait<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
10131013
invalidator.ident.as_str(),
10141014
invalidated_items.iter()
10151015
.map(<ast::Name>::as_str)
1016-
.collect::<Vec<_>>().connect("`, `"))
1016+
.collect::<Vec<_>>().join("`, `"))
10171017
}
10181018
}
10191019

@@ -2868,7 +2868,7 @@ fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
28682868
span_err!(tcx.sess, span, E0063,
28692869
"missing field{}: {}",
28702870
if missing_fields.len() == 1 {""} else {"s"},
2871-
missing_fields.connect(", "));
2871+
missing_fields.join(", "));
28722872
}
28732873
}
28742874

branches/stable/src/librustc_typeck/coherence/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
514514
} else {
515515
name.to_string()
516516
}, a, b)
517-
}).collect::<Vec<_>>().connect(", "));
517+
}).collect::<Vec<_>>().join(", "));
518518
return;
519519
}
520520

branches/stable/src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ fn convert_typed_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
15361536
d => format!("{:?}", d),
15371537
})
15381538
.collect::<Vec<String>>()
1539-
.connect(",");
1539+
.join(",");
15401540

15411541
tcx.sess.span_err(it.span, &object_lifetime_default_reprs);
15421542
}

0 commit comments

Comments
 (0)