Skip to content

Commit 4e8b4a5

Browse files
committed
---
yaml --- r: 235393 b: refs/heads/stable c: 6e1d01f h: refs/heads/master i: 235391: 768beb2 v: v3
1 parent 63cad2d commit 4e8b4a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+505
-691
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: 5f552a5da53e8164a13c337b6cbe39c3f20f35ff
32+
refs/heads/stable: 6e1d01f79e618e9ade7bdf4920b63f54f6aa51cb
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.join("\n");
347+
let mut cmds = commands.connect("\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-
.join(" ");
802+
.connect(" ");
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.join(" "))
1415+
format!("{} {}", prog, args.connect(" "))
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.join(" "))
1423+
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
14241424
}
14251425
}
14261426

branches/stable/src/doc/trpl/dining-philosophers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,15 +460,15 @@ If you run this program, you’ll see that the philosophers eat out of order!
460460
We have multi-threading!
461461

462462
```text
463+
Judith Butler is eating.
463464
Gilles Deleuze is eating.
464-
Gilles Deleuze is done eating.
465+
Karl Marx is eating.
465466
Emma Goldman is eating.
466-
Emma Goldman is done eating.
467467
Michel Foucault is eating.
468-
Judith Butler is eating.
469468
Judith Butler is done eating.
470-
Karl Marx is eating.
469+
Gilles Deleuze is done eating.
471470
Karl Marx is done eating.
471+
Emma Goldman is done eating.
472472
Michel Foucault is done eating.
473473
```
474474

branches/stable/src/libcollections/slice.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,17 +1056,6 @@ pub trait SliceConcatExt<T: ?Sized> {
10561056
#[stable(feature = "rust1", since = "1.0.0")]
10571057
fn concat(&self) -> Self::Output;
10581058

1059-
/// Flattens a slice of `T` into a single value `Self::Output`, placing a
1060-
/// given separator between each.
1061-
///
1062-
/// # Examples
1063-
///
1064-
/// ```
1065-
/// assert_eq!(["hello", "world"].join(" "), "hello world");
1066-
/// ```
1067-
#[stable(feature = "rename_connect_to_join", since = "1.3.0")]
1068-
fn join(&self, sep: &T) -> Self::Output;
1069-
10701059
/// Flattens a slice of `T` into a single value `Self::Output`, placing a
10711060
/// given separator between each.
10721061
///
@@ -1076,7 +1065,6 @@ pub trait SliceConcatExt<T: ?Sized> {
10761065
/// assert_eq!(["hello", "world"].connect(" "), "hello world");
10771066
/// ```
10781067
#[stable(feature = "rust1", since = "1.0.0")]
1079-
#[deprecated(since = "1.3.0", reason = "renamed to join")]
10801068
fn connect(&self, sep: &T) -> Self::Output;
10811069
}
10821070

@@ -1092,7 +1080,7 @@ impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] {
10921080
result
10931081
}
10941082

1095-
fn join(&self, sep: &T) -> Vec<T> {
1083+
fn connect(&self, sep: &T) -> Vec<T> {
10961084
let size = self.iter().fold(0, |acc, v| acc + v.borrow().len());
10971085
let mut result = Vec::with_capacity(size + self.len());
10981086
let mut first = true;
@@ -1102,10 +1090,6 @@ impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] {
11021090
}
11031091
result
11041092
}
1105-
1106-
fn connect(&self, sep: &T) -> Vec<T> {
1107-
self.join(sep)
1108-
}
11091093
}
11101094

11111095
/// An iterator that yields the element swaps needed to produce

branches/stable/src/libcollections/str.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
103103
result
104104
}
105105

106-
fn join(&self, sep: &str) -> String {
106+
fn connect(&self, sep: &str) -> String {
107107
if self.is_empty() {
108108
return String::new();
109109
}
@@ -130,10 +130,6 @@ impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
130130
}
131131
result
132132
}
133-
134-
fn connect(&self, sep: &str) -> String {
135-
self.join(sep)
136-
}
137133
}
138134

139135
// Helper functions used for Unicode normalization

branches/stable/src/libcollectionstest/slice.rs

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

585585
let v: &[&[_]] = &[&[1], &[2, 3]];
586-
assert_eq!(v.join(&0), [1, 0, 2, 3]);
586+
assert_eq!(v.connect(&0), [1, 0, 2, 3]);
587587
let v: &[&[_]] = &[&[1], &[2], &[3]];
588-
assert_eq!(v.join(&0), [1, 0, 2, 0, 3]);
588+
assert_eq!(v.connect(&0), [1, 0, 2, 0, 3]);
589589
}
590590

591591
#[test]
592-
fn test_join() {
592+
fn test_connect() {
593593
let v: [Vec<i32>; 0] = [];
594-
assert_eq!(v.join(&0), []);
595-
assert_eq!([vec![1], vec![2, 3]].join(&0), [1, 0, 2, 3]);
596-
assert_eq!([vec![1], vec![2], vec![3]].join(&0), [1, 0, 2, 0, 3]);
594+
assert_eq!(v.connect(&0), []);
595+
assert_eq!([vec![1], vec![2, 3]].connect(&0), [1, 0, 2, 3]);
596+
assert_eq!([vec![1], vec![2], vec![3]].connect(&0), [1, 0, 2, 0, 3]);
597597

598598
let v: [&[_]; 2] = [&[1], &[2, 3]];
599-
assert_eq!(v.join(&0), [1, 0, 2, 3]);
599+
assert_eq!(v.connect(&0), [1, 0, 2, 3]);
600600
let v: [&[_]; 3] = [&[1], &[2], &[3]];
601-
assert_eq!(v.join(&0), [1, 0, 2, 0, 3]);
601+
assert_eq!(v.connect(&0), [1, 0, 2, 0, 3]);
602602
}
603603

604604
#[test]
@@ -1316,11 +1316,11 @@ mod bench {
13161316
}
13171317

13181318
#[bench]
1319-
fn join(b: &mut Bencher) {
1319+
fn connect(b: &mut Bencher) {
13201320
let xss: Vec<Vec<i32>> =
13211321
(0..100).map(|i| (0..i).collect()).collect();
13221322
b.iter(|| {
1323-
xss.join(&0)
1323+
xss.connect(&0)
13241324
});
13251325
}
13261326

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

170170
#[test]
171-
fn test_join_for_different_types() {
172-
test_join!("a-b", ["a", "b"], "-");
171+
fn test_connect_for_different_types() {
172+
test_connect!("a-b", ["a", "b"], "-");
173173
let hyphen = "-".to_string();
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")], "-");
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")], "-");
178178
}
179179

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

189189
#[test]
@@ -2089,12 +2089,12 @@ mod bench {
20892089
}
20902090

20912091
#[bench]
2092-
fn bench_join(b: &mut Bencher) {
2092+
fn bench_connect(b: &mut Bencher) {
20932093
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
20942094
let sep = "→";
20952095
let v = vec![s, s, s, s, s, s, s, s, s, s];
20962096
b.iter(|| {
2097-
assert_eq!(v.join(sep).len(), s.len() * 10 + sep.len() * 9);
2097+
assert_eq!(v.connect(sep).len(), s.len() * 10 + sep.len() * 9);
20982098
})
20992099
}
21002100

branches/stable/src/libcore/num/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,15 @@ macro_rules! int_impl {
459459
}
460460
}
461461

462-
/// Wrapping (modular) division. Computes `self / other`,
462+
/// Wrapping (modular) division. Computes `floor(self / other)`,
463463
/// wrapping around at the boundary of the type.
464464
///
465465
/// The only case where such wrapping can occur is when one
466466
/// divides `MIN / -1` on a signed type (where `MIN` is the
467467
/// negative minimal value for the type); this is equivalent
468468
/// to `-MIN`, a positive value that is too large to represent
469469
/// in the type. In such a case, this function returns `MIN`
470-
/// itself.
470+
/// itself..
471471
#[stable(feature = "num_wrapping", since = "1.2.0")]
472472
#[inline(always)]
473473
pub fn wrapping_div(self, rhs: Self) -> Self {
@@ -1031,15 +1031,15 @@ macro_rules! uint_impl {
10311031
}
10321032
}
10331033

1034-
/// Wrapping (modular) division. Computes `self / other`,
1034+
/// Wrapping (modular) division. Computes `floor(self / other)`,
10351035
/// wrapping around at the boundary of the type.
10361036
///
10371037
/// The only case where such wrapping can occur is when one
10381038
/// divides `MIN / -1` on a signed type (where `MIN` is the
10391039
/// negative minimal value for the type); this is equivalent
10401040
/// to `-MIN`, a positive value that is too large to represent
10411041
/// in the type. In such a case, this function returns `MIN`
1042-
/// itself.
1042+
/// itself..
10431043
#[stable(feature = "num_wrapping", since = "1.2.0")]
10441044
#[inline(always)]
10451045
pub fn wrapping_div(self, rhs: Self) -> Self {

branches/stable/src/libcore/ops.rs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,8 @@ pub trait Div<RHS=Self> {
351351
fn div(self, rhs: RHS) -> Self::Output;
352352
}
353353

354-
macro_rules! div_impl_integer {
354+
macro_rules! div_impl {
355355
($($t:ty)*) => ($(
356-
/// This operation rounds towards zero, truncating any
357-
/// fractional part of the exact result.
358356
#[stable(feature = "rust1", since = "1.0.0")]
359357
impl Div for $t {
360358
type Output = $t;
@@ -367,23 +365,7 @@ macro_rules! div_impl_integer {
367365
)*)
368366
}
369367

370-
div_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
371-
372-
macro_rules! div_impl_float {
373-
($($t:ty)*) => ($(
374-
#[stable(feature = "rust1", since = "1.0.0")]
375-
impl Div for $t {
376-
type Output = $t;
377-
378-
#[inline]
379-
fn div(self, other: $t) -> $t { self / other }
380-
}
381-
382-
forward_ref_binop! { impl Div, div for $t, $t }
383-
)*)
384-
}
385-
386-
div_impl_float! { f32 f64 }
368+
div_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
387369

388370
/// The `Rem` trait is used to specify the functionality of `%`.
389371
///
@@ -425,8 +407,6 @@ pub trait Rem<RHS=Self> {
425407

426408
macro_rules! rem_impl {
427409
($($t:ty)*) => ($(
428-
/// This operation satisfies `n % d == n - (n / d) * d`. The
429-
/// result has the same sign as the left operand.
430410
#[stable(feature = "rust1", since = "1.0.0")]
431411
impl Rem for $t {
432412
type Output = $t;

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.join(&desc_sep[..]));
787+
row.push_str(&desc_rows.connect(&desc_sep[..]));
788788

789789
row
790790
});
791791

792792
format!("{}\n\nOptions:\n{}\n", brief,
793-
rows.collect::<Vec<String>>().join("\n"))
793+
rows.collect::<Vec<String>>().connect("\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-
.join(" ")[..]);
839+
.connect(" ")[..]);
840840
line
841841
}
842842

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ pub fn get_item_attrs(cstore: &cstore::CStore,
197197

198198
pub fn get_struct_fields(cstore: &cstore::CStore,
199199
def: ast::DefId)
200-
-> Vec<ty::FieldTy> {
200+
-> Vec<ty::field_ty> {
201201
let cdata = cstore.get_crate_data(def.krate);
202202
decoder::get_struct_fields(cstore.intr.clone(), &*cdata, def.node)
203203
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ fn struct_field_family_to_visibility(family: Family) -> ast::Visibility {
10491049
}
10501050

10511051
pub fn get_struct_fields(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::NodeId)
1052-
-> Vec<ty::FieldTy> {
1052+
-> Vec<ty::field_ty> {
10531053
let data = cdata.data();
10541054
let item = lookup_item(id, data);
10551055
reader::tagged_docs(item, tag_item_field).filter_map(|an_item| {
@@ -1059,7 +1059,7 @@ pub fn get_struct_fields(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::NodeId)
10591059
let did = item_def_id(an_item, cdata);
10601060
let tagdoc = reader::get_doc(an_item, tag_item_field_origin);
10611061
let origin_id = translated_def_id(cdata, tagdoc);
1062-
Some(ty::FieldTy {
1062+
Some(ty::field_ty {
10631063
name: name,
10641064
id: did,
10651065
vis: struct_field_family_to_visibility(f),
@@ -1073,7 +1073,7 @@ pub fn get_struct_fields(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::NodeId)
10731073
let tagdoc = reader::get_doc(an_item, tag_item_field_origin);
10741074
let f = item_family(an_item);
10751075
let origin_id = translated_def_id(cdata, tagdoc);
1076-
ty::FieldTy {
1076+
ty::field_ty {
10771077
name: special_idents::unnamed_field.name,
10781078
id: did,
10791079
vis: struct_field_family_to_visibility(f),

0 commit comments

Comments
 (0)