Skip to content

Commit fecf5f9

Browse files
---
yaml --- r: 220527 b: refs/heads/tmp c: 6c70127 h: refs/heads/master i: 220525: e9c8cbd 220523: b04df9b 220519: 72db5c4 220511: 6f5a05f v: v3
1 parent ad7b7e7 commit fecf5f9

Some content is hidden

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

100 files changed

+545
-766
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: c8bab9d06a179028a0d5129aa62f09d694d9cc49
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 680053848928a94f933c5a453c031b458e9766e0
28+
refs/heads/tmp: 6c701275b3a4583ccc43d23cdaea607ab2786217
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1b28ffa5216c845d1cef6b0cb3e5ac7db12025d0
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ Santiago Rodriguez <[email protected]>
958958
Saurabh Anand <[email protected]>
959959
Scott Jenkins <[email protected]>
960960
Scott Lawrence <[email protected]>
961-
Scott Olson <scott@solson.me>
961+
Scott Olson <scott@scott-olson.org>
962962
Sean Bowe <[email protected]>
963963
Sean Chalmers <[email protected]>
964964
Sean Collins <[email protected]>

branches/tmp/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/tmp/src/doc/trpl/dining-philosophers.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ look at `main()` again:
151151
# struct Philosopher {
152152
# name: String,
153153
# }
154-
#
154+
#
155155
# impl Philosopher {
156156
# fn new(name: &str) -> Philosopher {
157157
# Philosopher {
158158
# name: name.to_string(),
159159
# }
160160
# }
161161
# }
162-
#
162+
#
163163
fn main() {
164164
let p1 = Philosopher::new("Judith Butler");
165165
let p2 = Philosopher::new("Gilles Deleuze");
@@ -197,15 +197,15 @@ a method, and then loop through all the philosophers, calling it:
197197
```rust
198198
struct Philosopher {
199199
name: String,
200-
}
200+
}
201201

202-
impl Philosopher {
202+
impl Philosopher {
203203
fn new(name: &str) -> Philosopher {
204204
Philosopher {
205205
name: name.to_string(),
206206
}
207207
}
208-
208+
209209
fn eat(&self) {
210210
println!("{} is done eating.", self.name);
211211
}
@@ -267,15 +267,15 @@ use std::thread;
267267

268268
struct Philosopher {
269269
name: String,
270-
}
270+
}
271271

272-
impl Philosopher {
272+
impl Philosopher {
273273
fn new(name: &str) -> Philosopher {
274274
Philosopher {
275275
name: name.to_string(),
276276
}
277277
}
278-
278+
279279
fn eat(&self) {
280280
println!("{} is eating.", self.name);
281281

@@ -348,9 +348,9 @@ use std::thread;
348348

349349
struct Philosopher {
350350
name: String,
351-
}
351+
}
352352

353-
impl Philosopher {
353+
impl Philosopher {
354354
fn new(name: &str) -> Philosopher {
355355
Philosopher {
356356
name: name.to_string(),
@@ -401,7 +401,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
401401
While this is only five lines, they’re a dense five. Let’s break it down.
402402

403403
```rust,ignore
404-
let handles: Vec<_> =
404+
let handles: Vec<_> =
405405
```
406406

407407
We introduce a new binding, called `handles`. We’ve given it this name because
@@ -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.
464463
Gilles Deleuze is eating.
465-
Karl Marx is eating.
464+
Gilles Deleuze is done eating.
466465
Emma Goldman is eating.
466+
Emma Goldman is done eating.
467467
Michel Foucault is eating.
468+
Judith Butler is eating.
468469
Judith Butler is done eating.
469-
Gilles Deleuze is done eating.
470+
Karl Marx is eating.
470471
Karl Marx is done eating.
471-
Emma Goldman is done eating.
472472
Michel Foucault is done eating.
473473
```
474474

branches/tmp/src/etc/errorck.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,6 @@
2323
errcode_map = {}
2424
error_re = re.compile("(E\d\d\d\d)")
2525

26-
# In the register_long_diagnostics! macro, entries look like this:
27-
#
28-
# EXXXX: r##"
29-
# <Long diagnostic message>
30-
# "##,
31-
#
32-
# These two variables are for detecting the beginning and end of diagnostic
33-
# messages so that duplicate error codes are not reported when a code occurs
34-
# inside a diagnostic message
35-
long_diag_begin = "r##\""
36-
long_diag_end = "\"##"
37-
3826
for (dirpath, dirnames, filenames) in os.walk(src_dir):
3927
if "src/test" in dirpath or "src/llvm" in dirpath:
4028
# Short circuit for fast
@@ -47,14 +35,7 @@
4735
path = os.path.join(dirpath, filename)
4836

4937
with open(path, 'r') as f:
50-
inside_long_diag = False
5138
for line_num, line in enumerate(f, start=1):
52-
if inside_long_diag:
53-
# Skip duplicate error code checking for this line
54-
if long_diag_end in line:
55-
inside_long_diag = False
56-
continue
57-
5839
match = error_re.search(line)
5940
if match:
6041
errcode = match.group(1)
@@ -66,9 +47,6 @@
6647
else:
6748
errcode_map[errcode] = new_record
6849

69-
if long_diag_begin in line:
70-
inside_long_diag = True
71-
7250
errors = False
7351
all_errors = []
7452

branches/tmp/src/liballoc/boxed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ use core::raw::{TraitObject};
7171
/// The following two examples are equivalent:
7272
///
7373
/// ```
74-
/// # #![feature(box_heap)]
74+
/// #![feature(box_heap)]
7575
/// #![feature(box_syntax)]
7676
/// use std::boxed::HEAP;
7777
///
@@ -162,7 +162,7 @@ impl<T : ?Sized> Box<T> {
162162
///
163163
/// # Examples
164164
/// ```
165-
/// # #![feature(box_raw)]
165+
/// #![feature(box_raw)]
166166
/// use std::boxed;
167167
///
168168
/// let seventeen = Box::new(17u32);

branches/tmp/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/tmp/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/tmp/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/tmp/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

0 commit comments

Comments
 (0)