Skip to content

Commit 1e59f82

Browse files
committed
---
yaml --- r: 235390 b: refs/heads/stable c: 218eb12 h: refs/heads/master v: v3
1 parent d4c5d1a commit 1e59f82

File tree

119 files changed

+697
-1075
lines changed

Some content is hidden

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

119 files changed

+697
-1075
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: c044791d80ea0dc5c4b57b6030a67b69f8510239
32+
refs/heads/stable: 218eb1277d95090c7db5ba0242194b497784d04e
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/mk/cfg/i686-unknown-freebsd.mk

Lines changed: 0 additions & 22 deletions
This file was deleted.

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

branches/stable/src/libcollections/str.rs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ use core::result::Result;
6161
use core::str as core_str;
6262
use core::str::pattern::Pattern;
6363
use core::str::pattern::{Searcher, ReverseSearcher, DoubleEndedSearcher};
64-
use core::mem;
6564
use rustc_unicode::str::{UnicodeStr, Utf16Encoder};
6665

6766
use vec_deque::VecDeque;
@@ -70,7 +69,6 @@ use string::String;
7069
use rustc_unicode;
7170
use vec::Vec;
7271
use slice::SliceConcatExt;
73-
use boxed::Box;
7472

7573
pub use core::str::{FromStr, Utf8Error};
7674
pub use core::str::{Lines, LinesAny, CharRange};
@@ -84,6 +82,10 @@ pub use core::str::{from_utf8_unchecked, ParseBoolError};
8482
pub use rustc_unicode::str::{SplitWhitespace, Words, Graphemes, GraphemeIndices};
8583
pub use core::str::pattern;
8684

85+
/*
86+
Section: Creating a string
87+
*/
88+
8789
impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
8890
type Output = String;
8991

@@ -103,7 +105,7 @@ impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
103105
result
104106
}
105107

106-
fn join(&self, sep: &str) -> String {
108+
fn connect(&self, sep: &str) -> String {
107109
if self.is_empty() {
108110
return String::new();
109111
}
@@ -130,12 +132,12 @@ impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
130132
}
131133
result
132134
}
133-
134-
fn connect(&self, sep: &str) -> String {
135-
self.join(sep)
136-
}
137135
}
138136

137+
/*
138+
Section: Iterators
139+
*/
140+
139141
// Helper functions used for Unicode normalization
140142
fn canonical_sort(comb: &mut [(char, u8)]) {
141143
let len = comb.len();
@@ -380,6 +382,10 @@ impl<'a> Iterator for Utf16Units<'a> {
380382
fn size_hint(&self) -> (usize, Option<usize>) { self.encoder.size_hint() }
381383
}
382384

385+
/*
386+
Section: Misc
387+
*/
388+
383389
// Return the initial codepoint accumulator for the first byte.
384390
// The first byte is special, only want bottom 5 bits for width 2, 4 bits
385391
// for width 3, and 3 bits for width 4
@@ -408,6 +414,15 @@ impl ToOwned for str {
408414
}
409415
}
410416

417+
/*
418+
Section: CowString
419+
*/
420+
421+
/*
422+
Section: Trait implementations
423+
*/
424+
425+
411426
/// Any string that can be represented as a slice.
412427
#[lang = "str"]
413428
#[cfg(not(test))]
@@ -1909,14 +1924,4 @@ impl str {
19091924
pub fn escape_unicode(&self) -> String {
19101925
self.chars().flat_map(|c| c.escape_unicode()).collect()
19111926
}
1912-
1913-
/// Converts the `Box<str>` into a `String` without copying or allocating.
1914-
#[unstable(feature = "box_str",
1915-
reason = "recently added, matches RFC")]
1916-
pub fn into_string(self: Box<str>) -> String {
1917-
unsafe {
1918-
let slice = mem::transmute::<Box<str>, Box<[u8]>>(self);
1919-
String::from_utf8_unchecked(slice.into_vec())
1920-
}
1921-
}
19221927
}

branches/stable/src/libcollections/string.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use borrow::{Cow, IntoCow};
2929
use range::RangeArgument;
3030
use str::{self, FromStr, Utf8Error, Chars};
3131
use vec::{DerefVec, Vec, as_vec};
32-
use boxed::Box;
3332

3433
/// A growable string stored as a UTF-8 encoded buffer.
3534
#[derive(Clone, PartialOrd, Eq, Ord)]
@@ -742,16 +741,6 @@ impl String {
742741
string: self_ptr,
743742
}
744743
}
745-
746-
/// Converts the string into `Box<str>`.
747-
///
748-
/// Note that this will drop any excess capacity.
749-
#[unstable(feature = "box_str",
750-
reason = "recently added, matches RFC")]
751-
pub fn into_boxed_slice(self) -> Box<str> {
752-
let slice = self.vec.into_boxed_slice();
753-
unsafe { mem::transmute::<Box<[u8]>, Box<str>>(slice) }
754-
}
755744
}
756745

757746
impl FromUtf8Error {

branches/stable/src/libcollections/vec_deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl<T> VecDeque<T> {
108108
ptr::write(self.ptr.offset(off as isize), t);
109109
}
110110

111-
/// Returns true if and only if the buffer is at capacity
111+
/// Returns true iff the buffer is at capacity
112112
#[inline]
113113
fn is_full(&self) -> bool { self.cap - self.len() == 1 }
114114

branches/stable/src/libcollectionstest/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,24 @@
3636
#![feature(rustc_private)]
3737
#![feature(slice_bytes)]
3838
#![feature(slice_chars)]
39-
#![feature(slice_splits)]
39+
#![feature(slice_extras)]
4040
#![feature(slice_position_elem)]
4141
#![feature(split_off)]
4242
#![feature(step_by)]
4343
#![feature(str_char)]
4444
#![feature(str_escape)]
4545
#![feature(str_match_indices)]
4646
#![feature(str_utf16)]
47-
#![feature(box_str)]
4847
#![feature(subslice_offset)]
4948
#![feature(test)]
5049
#![feature(unboxed_closures)]
5150
#![feature(unicode)]
5251
#![feature(vec_deque_retain)]
5352
#![feature(vec_from_raw_buf)]
5453
#![feature(vec_push_all)]
54+
#![feature(vec_split_off)]
5555
#![feature(vecmap)]
5656

57-
#![allow(deprecated)]
58-
5957
#[macro_use] extern crate log;
6058

6159
extern crate collections;

0 commit comments

Comments
 (0)