Skip to content

Commit e31f749

Browse files
committed
---
yaml --- r: 234897 b: refs/heads/stable c: b213c94 h: refs/heads/master i: 234895: c6698c5 v: v3
1 parent 0a96840 commit e31f749

File tree

10 files changed

+46
-591
lines changed

10 files changed

+46
-591
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: db9af26d762e15b7f96194145d7b1c17328db021
32+
refs/heads/stable: b213c947f80582857681a8b8ed4033627997e7e5
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,18 @@ then
899899
fi
900900
fi
901901

902+
# If the clang isn't already enabled, check for GCC, and if it is missing, turn
903+
# on clang as a backup.
904+
if [ -z "$CFG_ENABLE_CLANG" ]
905+
then
906+
CFG_GCC_VERSION=$("$CFG_GCC" --version 2>&1)
907+
if [ $? -ne 0 ]
908+
then
909+
step_msg "GCC not installed, will try using Clang"
910+
CFG_ENABLE_CLANG=1
911+
fi
912+
fi
913+
902914
# Okay, at this point, we have made up our minds about whether we are
903915
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
904916
if [ ! -z "$CFG_ENABLE_CLANG" ]

branches/stable/src/etc/unicode.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title):
372372
}
373373
}
374374
375-
pub fn to_title(c: char) -> [char; 3] {
376-
match bsearch_case_table(c, to_titlecase_table) {
377-
None => [c, '\\0', '\\0'],
378-
Some(index) => to_titlecase_table[index].1
379-
}
380-
}
381-
382375
fn bsearch_case_table(c: char, table: &'static [(char, [char; 3])]) -> Option<usize> {
383376
match table.binary_search_by(|&(key, _)| {
384377
if c == key { Equal }
@@ -400,9 +393,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title):
400393
emit_table(f, "to_uppercase_table",
401394
sorted(to_upper.iteritems(), key=operator.itemgetter(0)),
402395
is_pub=False, t_type = t_type, pfun=pfun)
403-
emit_table(f, "to_titlecase_table",
404-
sorted(to_title.iteritems(), key=operator.itemgetter(0)),
405-
is_pub=False, t_type = t_type, pfun=pfun)
406396
f.write("}\n\n")
407397

408398
def emit_grapheme_module(f, grapheme_table, grapheme_cats):

branches/stable/src/libcollections/vec.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ impl<T> FromIterator<T> for Vec<T> {
14821482
None => return Vec::new(),
14831483
Some(element) => {
14841484
let (lower, _) = iterator.size_hint();
1485-
let mut vector = Vec::with_capacity(1 + lower);
1485+
let mut vector = Vec::with_capacity(lower.saturating_add(1));
14861486
unsafe {
14871487
ptr::write(vector.get_unchecked_mut(0), element);
14881488
vector.set_len(1);
@@ -1570,10 +1570,11 @@ impl<T> Vec<T> {
15701570
let len = self.len();
15711571
if len == self.capacity() {
15721572
let (lower, _) = iterator.size_hint();
1573-
self.reserve(lower + 1);
1573+
self.reserve(lower.saturating_add(1));
15741574
}
15751575
unsafe {
15761576
ptr::write(self.get_unchecked_mut(len), element);
1577+
// NB can't overflow since we would have had to alloc the address space
15771578
self.set_len(len + 1);
15781579
}
15791580
}

branches/stable/src/libcollectionstest/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
#![feature(append)]
12-
#![feature(bit_vec_append_split_off)]
1312
#![feature(bitset)]
1413
#![feature(bitvec)]
1514
#![feature(box_syntax)]

branches/stable/src/libcoretest/char.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -102,29 +102,6 @@ fn test_to_uppercase() {
102102
assert_eq!(upper('ᾀ'), ['Ἀ', 'Ι']);
103103
}
104104

105-
#[test]
106-
fn test_to_titlecase() {
107-
fn title(c: char) -> Vec<char> {
108-
c.to_titlecase().collect()
109-
}
110-
assert_eq!(title('a'), ['A']);
111-
assert_eq!(title('ö'), ['Ö']);
112-
assert_eq!(title('ß'), ['S', 's']); // not ẞ: Latin capital letter sharp s
113-
assert_eq!(title('ü'), ['Ü']);
114-
assert_eq!(title('💩'), ['💩']);
115-
116-
assert_eq!(title('σ'), ['Σ']);
117-
assert_eq!(title('τ'), ['Τ']);
118-
assert_eq!(title('ι'), ['Ι']);
119-
assert_eq!(title('γ'), ['Γ']);
120-
assert_eq!(title('μ'), ['Μ']);
121-
assert_eq!(title('α'), ['Α']);
122-
assert_eq!(title('ς'), ['Σ']);
123-
assert_eq!(title('DŽ'), ['Dž']);
124-
assert_eq!(title('fi'), ['F', 'i']);
125-
assert_eq!(title('ᾀ'), ['ᾈ']);
126-
}
127-
128105
#[test]
129106
fn test_is_control() {
130107
assert!('\u{0}'.is_control());

branches/stable/src/librustc_unicode/char.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,6 @@ impl Iterator for ToUppercase {
6767
fn next(&mut self) -> Option<char> { self.0.next() }
6868
}
6969

70-
/// An iterator over the titlecase mapping of a given character, returned from
71-
/// the [`to_titlecase` method](../primitive.char.html#method.to_titlecase) on
72-
/// characters.
73-
#[unstable(feature = "unicode", reason = "recently added")]
74-
pub struct ToTitlecase(CaseMappingIter);
75-
76-
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
77-
impl Iterator for ToTitlecase {
78-
type Item = char;
79-
fn next(&mut self) -> Option<char> { self.0.next() }
80-
}
81-
8270

8371
enum CaseMappingIter {
8472
Three(char, char, char),
@@ -477,27 +465,6 @@ impl char {
477465
ToLowercase(CaseMappingIter::new(conversions::to_lower(self)))
478466
}
479467

480-
/// Converts a character to its titlecase equivalent.
481-
///
482-
/// This performs complex unconditional mappings with no tailoring.
483-
/// See `to_uppercase()` for references and more information.
484-
///
485-
/// This differs from `to_uppercase()` since Unicode contains
486-
/// digraphs and ligature characters.
487-
/// For example, U+01F3 “dz” and U+FB01 “fi”
488-
/// map to U+01F1 “DZ” and U+0046 U+0069 “Fi”, respectively.
489-
///
490-
/// # Return value
491-
///
492-
/// Returns an iterator which yields the characters corresponding to the
493-
/// titlecase equivalent of the character. If no conversion is possible then
494-
/// an iterator with just the input character is returned.
495-
#[unstable(feature = "unicode", reason = "recently added")]
496-
#[inline]
497-
pub fn to_titlecase(self) -> ToTitlecase {
498-
ToTitlecase(CaseMappingIter::new(conversions::to_title(self)))
499-
}
500-
501468
/// Converts a character to its uppercase equivalent.
502469
///
503470
/// This performs complex unconditional mappings with no tailoring:

0 commit comments

Comments
 (0)