Skip to content

Commit 776bfa0

Browse files
author
Nick Hamann
committed
---
yaml --- r: 220091 b: refs/heads/snap-stage3 c: 4bc8369 h: refs/heads/master i: 220089: 7c97854 220087: 9d8238d v: v3
1 parent a8d26f1 commit 776bfa0

File tree

116 files changed

+704
-981
lines changed

Some content is hidden

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

116 files changed

+704
-981
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: c044791d80ea0dc5c4b57b6030a67b69f8510239
3-
refs/heads/snap-stage3: 0fbcebaaec518a0a39f0b835cd52e9edfaba9cc2
3+
refs/heads/snap-stage3: 4bc8369a267912e0bf6684a46ceef51c6c373713
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/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/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#![feature(libc)]
1616
#![feature(path_ext)]
1717
#![feature(rustc_private)]
18-
#![feature(slice_splits)]
18+
#![feature(slice_extras)]
1919
#![feature(str_char)]
2020
#![feature(test)]
2121
#![feature(vec_push_all)]
@@ -90,7 +90,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
9090
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
9191
optflag("h", "help", "show this message"));
9292

93-
let (argv0, args_) = args.split_first().unwrap();
93+
assert!(!args.is_empty());
94+
let argv0 = args[0].clone();
95+
let args_ = args.tail();
9496
if args[1] == "-h" || args[1] == "--help" {
9597
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
9698
println!("{}", getopts::usage(&message, &groups));

branches/snap-stage3/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/snap-stage3/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/snap-stage3/src/etc/errorck.py

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

26+
long_diag_begin = "r##\""
27+
long_diag_end = "\"##"
28+
2629
for (dirpath, dirnames, filenames) in os.walk(src_dir):
2730
if "src/test" in dirpath or "src/llvm" in dirpath:
2831
# Short circuit for fast
@@ -35,7 +38,13 @@
3538
path = os.path.join(dirpath, filename)
3639

3740
with open(path, 'r') as f:
41+
inside_long_diag = False
3842
for line_num, line in enumerate(f, start=1):
43+
if inside_long_diag:
44+
if long_diag_end in line:
45+
inside_long_diag = False
46+
continue
47+
3948
match = error_re.search(line)
4049
if match:
4150
errcode = match.group(1)
@@ -47,6 +56,9 @@
4756
else:
4857
errcode_map[errcode] = new_record
4958

59+
if long_diag_begin in line:
60+
inside_long_diag = True
61+
5062
errors = False
5163
all_errors = []
5264

branches/snap-stage3/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/snap-stage3/src/libcollections/slice.rs

Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -282,65 +282,34 @@ impl<T> [T] {
282282

283283
/// Returns all but the first element of a slice.
284284
#[unstable(feature = "slice_extras", reason = "likely to be renamed")]
285-
#[deprecated(since = "1.3.0", reason = "superseded by split_first")]
286285
#[inline]
287286
pub fn tail(&self) -> &[T] {
288287
core_slice::SliceExt::tail(self)
289288
}
290289

291-
/// Returns the first and all the rest of the elements of a slice.
292-
#[unstable(feature = "slice_splits", reason = "new API")]
293-
#[inline]
294-
pub fn split_first(&self) -> Option<(&T, &[T])> {
295-
core_slice::SliceExt::split_first(self)
296-
}
297-
298290
/// Returns all but the first element of a mutable slice
299-
#[unstable(feature = "slice_extras", reason = "likely to be renamed or removed")]
300-
#[deprecated(since = "1.3.0", reason = "superseded by split_first_mut")]
291+
#[unstable(feature = "slice_extras",
292+
reason = "likely to be renamed or removed")]
301293
#[inline]
302294
pub fn tail_mut(&mut self) -> &mut [T] {
303295
core_slice::SliceExt::tail_mut(self)
304296
}
305297

306-
/// Returns the first and all the rest of the elements of a slice.
307-
#[unstable(feature = "slice_splits", reason = "new API")]
308-
#[inline]
309-
pub fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])> {
310-
core_slice::SliceExt::split_first_mut(self)
311-
}
312-
313298
/// Returns all but the last element of a slice.
314299
#[unstable(feature = "slice_extras", reason = "likely to be renamed")]
315-
#[deprecated(since = "1.3.0", reason = "superseded by split_last")]
316300
#[inline]
317301
pub fn init(&self) -> &[T] {
318302
core_slice::SliceExt::init(self)
319303
}
320304

321-
/// Returns the last and all the rest of the elements of a slice.
322-
#[unstable(feature = "slice_splits", reason = "new API")]
323-
#[inline]
324-
pub fn split_last(&self) -> Option<(&T, &[T])> {
325-
core_slice::SliceExt::split_last(self)
326-
327-
}
328-
329305
/// Returns all but the last element of a mutable slice
330-
#[unstable(feature = "slice_extras", reason = "likely to be renamed or removed")]
331-
#[deprecated(since = "1.3.0", reason = "superseded by split_last_mut")]
306+
#[unstable(feature = "slice_extras",
307+
reason = "likely to be renamed or removed")]
332308
#[inline]
333309
pub fn init_mut(&mut self) -> &mut [T] {
334310
core_slice::SliceExt::init_mut(self)
335311
}
336312

337-
/// Returns the last and all the rest of the elements of a slice.
338-
#[unstable(feature = "slice_splits", since = "1.3.0")]
339-
#[inline]
340-
pub fn split_last_mut(&mut self) -> Option<(&mut T, &mut [T])> {
341-
core_slice::SliceExt::split_last_mut(self)
342-
}
343-
344313
/// Returns the last element of a slice, or `None` if it is empty.
345314
///
346315
/// # Examples
@@ -1056,17 +1025,6 @@ pub trait SliceConcatExt<T: ?Sized> {
10561025
#[stable(feature = "rust1", since = "1.0.0")]
10571026
fn concat(&self) -> Self::Output;
10581027

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-
10701028
/// Flattens a slice of `T` into a single value `Self::Output`, placing a
10711029
/// given separator between each.
10721030
///
@@ -1076,7 +1034,6 @@ pub trait SliceConcatExt<T: ?Sized> {
10761034
/// assert_eq!(["hello", "world"].connect(" "), "hello world");
10771035
/// ```
10781036
#[stable(feature = "rust1", since = "1.0.0")]
1079-
#[deprecated(since = "1.3.0", reason = "renamed to join")]
10801037
fn connect(&self, sep: &T) -> Self::Output;
10811038
}
10821039

@@ -1092,7 +1049,7 @@ impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] {
10921049
result
10931050
}
10941051

1095-
fn join(&self, sep: &T) -> Vec<T> {
1052+
fn connect(&self, sep: &T) -> Vec<T> {
10961053
let size = self.iter().fold(0, |acc, v| acc + v.borrow().len());
10971054
let mut result = Vec::with_capacity(size + self.len());
10981055
let mut first = true;
@@ -1102,10 +1059,6 @@ impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] {
11021059
}
11031060
result
11041061
}
1105-
1106-
fn connect(&self, sep: &T) -> Vec<T> {
1107-
self.join(sep)
1108-
}
11091062
}
11101063

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

0 commit comments

Comments
 (0)