Skip to content

Commit 636d442

Browse files
committed
---
yaml --- r: 189913 b: refs/heads/tmp c: f58a653 h: refs/heads/master i: 189911: b20eed8 v: v3
1 parent acf38f9 commit 636d442

File tree

18 files changed

+436
-382
lines changed

18 files changed

+436
-382
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: f899513a30165946a75ff7f515ab37a226e72172
37+
refs/heads/tmp: f58a65374b6a372b641852283cc4ce94bdb07035
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: 7ce5a21b274ff53e77b561467177bc34c668f95e

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#![feature(unboxed_closures)]
2020
#![feature(std_misc)]
2121
#![feature(test)]
22+
#![feature(unicode)]
2223
#![feature(core)]
2324
#![feature(path)]
2425
#![feature(io)]

branches/tmp/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn parse_expected(last_nonfollow_error: Option<uint>,
7171
let letters = line[kind_start..].chars();
7272
let kind = letters.skip_while(|c| c.is_whitespace())
7373
.take_while(|c| !c.is_whitespace())
74-
.flat_map(|c| c.to_lowercase())
74+
.map(|c| c.to_lowercase())
7575
.collect::<String>();
7676
let letters = line[kind_start..].chars();
7777
let msg = letters.skip_while(|c| c.is_whitespace())

branches/tmp/src/libcollections/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ mod prelude {
175175
}
176176

177177
/// An endpoint of a range of keys.
178+
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
178179
pub enum Bound<T> {
179180
/// An inclusive bound.
180181
Included(T),

branches/tmp/src/libcollections/str.rs

Lines changed: 24 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212

1313
//! Unicode string manipulation (the [`str`](../primitive.str.html) type).
1414
//!
15-
//! Rust's [`str`](../primitive.str.html) type is one of the core primitive
16-
//! types of the language. `&str` is the borrowed string type. This type of
17-
//! string can only be created from other strings, unless it is a `&'static str`
18-
//! (see below). It is not possible to move out of borrowed strings because they
19-
//! are owned elsewhere.
15+
//! Rust's [`str`](../primitive.str.html) type is one of the core primitive types of the
16+
//! language. `&str` is the borrowed string type. This type of string can only be created
17+
//! from other strings, unless it is a `&'static str` (see below). It is not possible to
18+
//! move out of borrowed strings because they are owned elsewhere.
2019
//!
21-
//! Basic operations are implemented directly by the compiler, but more advanced
22-
//! operations are defined on the [`StrExt`](trait.StrExt.html) trait.
20+
//! Basic operations are implemented directly by the compiler, but more advanced operations are
21+
//! defined on the [`StrExt`](trait.StrExt.html) trait.
2322
//!
2423
//! # Examples
2524
//!
@@ -29,9 +28,8 @@
2928
//! let s = "Hello, world.";
3029
//! ```
3130
//!
32-
//! This `&str` is a `&'static str`, which is the type of string literals.
33-
//! They're `'static` because literals are available for the entire lifetime of
34-
//! the program.
31+
//! This `&str` is a `&'static str`, which is the type of string literals. They're `'static`
32+
//! because literals are available for the entire lifetime of the program.
3533
//!
3634
//! You can get a non-`'static` `&str` by taking a slice of a `String`:
3735
//!
@@ -42,30 +40,29 @@
4240
//!
4341
//! # Representation
4442
//!
45-
//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as
46-
//! a stream of UTF-8 bytes. All [strings](../../reference.html#literals) are
47-
//! guaranteed to be validly encoded UTF-8 sequences. Additionally, strings are
48-
//! not null-terminated and can thus contain null bytes.
43+
//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as a stream of UTF-8
44+
//! bytes. All [strings](../../reference.html#literals) are guaranteed to be validly encoded UTF-8
45+
//! sequences. Additionally, strings are not null-terminated and can thus contain null bytes.
4946
//!
50-
//! The actual representation of `str`s have direct mappings to slices: `&str`
51-
//! is the same as `&[u8]`.
47+
//! The actual representation of `str`s have direct mappings to slices: `&str` is the same as
48+
//! `&[u8]`.
5249
5350
#![doc(primitive = "str")]
5451
#![stable(feature = "rust1", since = "1.0.0")]
5552

5653
use self::RecompositionState::*;
5754
use self::DecompositionType::*;
5855

56+
use core::char::CharExt;
5957
use core::clone::Clone;
6058
use core::iter::AdditiveIterator;
61-
use core::iter::{Iterator, IteratorExt, Extend};
59+
use core::iter::{Iterator, IteratorExt};
6260
use core::ops::Index;
6361
use core::ops::RangeFull;
6462
use core::option::Option::{self, Some, None};
6563
use core::result::Result;
6664
use core::slice::AsSlice;
6765
use core::str as core_str;
68-
use unicode::char::CharExt;
6966
use unicode::str::{UnicodeStr, Utf16Encoder};
7067

7168
use vec_deque::VecDeque;
@@ -839,19 +836,17 @@ pub trait StrExt: Index<RangeFull, Output = str> {
839836

840837
/// Returns a slice of the string from the character range [`begin`..`end`).
841838
///
842-
/// That is, start at the `begin`-th code point of the string and continue
843-
/// to the `end`-th code point. This does not detect or handle edge cases
844-
/// such as leaving a combining character as the first code point of the
845-
/// string.
839+
/// That is, start at the `begin`-th code point of the string and continue to the `end`-th code
840+
/// point. This does not detect or handle edge cases such as leaving a combining character as
841+
/// the first code point of the string.
846842
///
847-
/// Due to the design of UTF-8, this operation is `O(end)`. See `slice`,
848-
/// `slice_to` and `slice_from` for `O(1)` variants that use byte indices
849-
/// rather than code point indices.
843+
/// Due to the design of UTF-8, this operation is `O(end)`. See `slice`, `slice_to` and
844+
/// `slice_from` for `O(1)` variants that use byte indices rather than code point indices.
850845
///
851846
/// # Panics
852847
///
853-
/// Panics if `begin` > `end` or the either `begin` or `end` are beyond the
854-
/// last character of the string.
848+
/// Panics if `begin` > `end` or the either `begin` or `end` are beyond the last character of
849+
/// the string.
855850
///
856851
/// # Examples
857852
///
@@ -873,8 +868,8 @@ pub trait StrExt: Index<RangeFull, Output = str> {
873868
///
874869
/// # Unsafety
875870
///
876-
/// Caller must check both UTF-8 character boundaries and the boundaries of
877-
/// the entire slice as well.
871+
/// Caller must check both UTF-8 character boundaries and the boundaries of the entire slice as
872+
/// well.
878873
///
879874
/// # Examples
880875
///
@@ -1511,32 +1506,6 @@ pub trait StrExt: Index<RangeFull, Output = str> {
15111506
fn trim_right(&self) -> &str {
15121507
UnicodeStr::trim_right(&self[..])
15131508
}
1514-
1515-
/// Returns the lowercase equivalent of this string.
1516-
///
1517-
/// # Examples
1518-
///
1519-
/// let s = "HELLO";
1520-
/// assert_eq!(s.to_lowercase(), "hello");
1521-
#[unstable(feature = "collections")]
1522-
fn to_lowercase(&self) -> String {
1523-
let mut s = String::with_capacity(self.len());
1524-
s.extend(self[..].chars().flat_map(|c| c.to_lowercase()));
1525-
return s;
1526-
}
1527-
1528-
/// Returns the uppercase equivalent of this string.
1529-
///
1530-
/// # Examples
1531-
///
1532-
/// let s = "hello";
1533-
/// assert_eq!(s.to_uppercase(), "HELLO");
1534-
#[unstable(feature = "collections")]
1535-
fn to_uppercase(&self) -> String {
1536-
let mut s = String::with_capacity(self.len());
1537-
s.extend(self[..].chars().flat_map(|c| c.to_uppercase()));
1538-
return s;
1539-
}
15401509
}
15411510

15421511
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)