Skip to content

Commit 99bbdc5

Browse files
committed
---
yaml --- r: 162023 b: refs/heads/master c: ca98fef h: refs/heads/master i: 162021: a5f94c2 162019: b85d370 162015: 7100984 v: v3
1 parent d678dd1 commit 99bbdc5

File tree

45 files changed

+7288
-8260
lines changed

Some content is hidden

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

45 files changed

+7288
-8260
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d2e2bd1b442948d4754bb1eb09ff1914a83604dd
2+
refs/heads/master: ca98fefd04b2a0ccd784f96538c824c49210a418
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cafe2966770ff377aad6dd9fd808e68055587c58
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6

trunk/src/etc/unicode.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,11 @@ def load_east_asian_width(want_widths, except_cats):
283283
return widths
284284

285285
def escape_char(c):
286-
return "'\\u{%x}'" % c
286+
if c <= 0x7f:
287+
return "'\\x%2.2x'" % c
288+
if c <= 0xffff:
289+
return "'\\u%4.4x'" % c
290+
return "'\\U%8.8x'" % c
287291

288292
def emit_bsearch_range_table(f):
289293
f.write("""
@@ -373,8 +377,8 @@ def emit_conversions_module(f, lowerupper, upperlower):
373377
else if key < c { Less }
374378
else { Greater }
375379
}) {
376-
slice::BinarySearchResult::Found(i) => Some(i),
377-
slice::BinarySearchResult::NotFound(_) => None,
380+
slice::Found(i) => Some(i),
381+
slice::NotFound(_) => None,
378382
}
379383
}
380384
@@ -388,7 +392,6 @@ def emit_conversions_module(f, lowerupper, upperlower):
388392
def emit_grapheme_module(f, grapheme_table, grapheme_cats):
389393
f.write("""pub mod grapheme {
390394
use core::slice::SlicePrelude;
391-
use core::kinds::Copy;
392395
pub use self::GraphemeCat::*;
393396
use core::slice;
394397
@@ -400,20 +403,18 @@ def emit_grapheme_module(f, grapheme_table, grapheme_cats):
400403
f.write(" GC_" + cat + ",\n")
401404
f.write(""" }
402405
403-
impl Copy for GraphemeCat {}
404-
405406
fn bsearch_range_value_table(c: char, r: &'static [(char, char, GraphemeCat)]) -> GraphemeCat {
406407
use core::cmp::Ordering::{Equal, Less, Greater};
407408
match r.binary_search(|&(lo, hi, _)| {
408409
if lo <= c && c <= hi { Equal }
409410
else if hi < c { Less }
410411
else { Greater }
411412
}) {
412-
slice::BinarySearchResult::Found(idx) => {
413+
slice::Found(idx) => {
413414
let (_, _, cat) = r[idx];
414415
cat
415416
}
416-
slice::BinarySearchResult::NotFound(_) => GC_Any
417+
slice::NotFound(_) => GC_Any
417418
}
418419
}
419420
@@ -442,11 +443,11 @@ def emit_charwidth_module(f, width_table):
442443
else if hi < c { Less }
443444
else { Greater }
444445
}) {
445-
slice::BinarySearchResult::Found(idx) => {
446+
slice::Found(idx) => {
446447
let (_, _, r_ncjk, r_cjk) = r[idx];
447448
if is_cjk { r_cjk } else { r_ncjk }
448449
}
449-
slice::BinarySearchResult::NotFound(_) => 1
450+
slice::NotFound(_) => 1
450451
}
451452
}
452453
""")
@@ -539,11 +540,11 @@ def comp_pfun(char):
539540
else if hi < c { Less }
540541
else { Greater }
541542
}) {
542-
slice::BinarySearchResult::Found(idx) => {
543+
slice::Found(idx) => {
543544
let (_, _, result) = r[idx];
544545
result
545546
}
546-
slice::BinarySearchResult::NotFound(_) => 0
547+
slice::NotFound(_) => 0
547548
}
548549
}\n
549550
""")
@@ -612,7 +613,7 @@ def optimize_width_table(wtable):
612613
unicode_version = re.search(pattern, readme.read()).groups()
613614
rf.write("""
614615
/// The version of [Unicode](http://www.unicode.org/)
615-
/// that the `UnicodeChar` and `UnicodeStrPrelude` traits are based on.
616+
/// that the `UnicodeChar` and `UnicodeStrSlice` traits are based on.
616617
pub const UNICODE_VERSION: (uint, uint, uint) = (%s, %s, %s);
617618
""" % unicode_version)
618619
(canon_decomp, compat_decomp, gencats, combines,

trunk/src/libcollections/btree/set.rs

Lines changed: 1 addition & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use core::iter::Peekable;
2222
use core::fmt::Show;
2323

2424
// FIXME(conventions): implement bounded iterators
25+
// FIXME(conventions): implement BitOr, BitAnd, BitXor, and Sub
2526

2627
/// A set based on a B-Tree.
2728
///
@@ -405,90 +406,6 @@ impl<T: Ord> Default for BTreeSet<T> {
405406
}
406407
}
407408

408-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
409-
impl<T: Ord + Clone> Sub<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
410-
/// Returns the difference of `self` and `rhs` as a new `BTreeSet<T>`.
411-
///
412-
/// # Examples
413-
///
414-
/// ```
415-
/// use std::collections::BTreeSet;
416-
///
417-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
418-
/// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
419-
///
420-
/// let result: BTreeSet<int> = a - b;
421-
/// let result_vec: Vec<int> = result.into_iter().collect();
422-
/// assert_eq!(result_vec, vec![1,2]);
423-
/// ```
424-
fn sub(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
425-
self.difference(rhs).cloned().collect()
426-
}
427-
}
428-
429-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
430-
impl<T: Ord + Clone> BitXor<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
431-
/// Returns the symmetric difference of `self` and `rhs` as a new `BTreeSet<T>`.
432-
///
433-
/// # Examples
434-
///
435-
/// ```
436-
/// use std::collections::BTreeSet;
437-
///
438-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
439-
/// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
440-
///
441-
/// let result: BTreeSet<int> = a ^ b;
442-
/// let result_vec: Vec<int> = result.into_iter().collect();
443-
/// assert_eq!(result_vec, vec![1,4]);
444-
/// ```
445-
fn bitxor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
446-
self.symmetric_difference(rhs).cloned().collect()
447-
}
448-
}
449-
450-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
451-
impl<T: Ord + Clone> BitAnd<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
452-
/// Returns the intersection of `self` and `rhs` as a new `BTreeSet<T>`.
453-
///
454-
/// # Examples
455-
///
456-
/// ```
457-
/// use std::collections::BTreeSet;
458-
///
459-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
460-
/// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
461-
///
462-
/// let result: BTreeSet<int> = a & b;
463-
/// let result_vec: Vec<int> = result.into_iter().collect();
464-
/// assert_eq!(result_vec, vec![2,3]);
465-
/// ```
466-
fn bitand(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
467-
self.intersection(rhs).cloned().collect()
468-
}
469-
}
470-
471-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
472-
impl<T: Ord + Clone> BitOr<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
473-
/// Returns the union of `self` and `rhs` as a new `BTreeSet<T>`.
474-
///
475-
/// # Examples
476-
///
477-
/// ```
478-
/// use std::collections::BTreeSet;
479-
///
480-
/// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
481-
/// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
482-
///
483-
/// let result: BTreeSet<int> = a | b;
484-
/// let result_vec: Vec<int> = result.into_iter().collect();
485-
/// assert_eq!(result_vec, vec![1,2,3,4,5]);
486-
/// ```
487-
fn bitor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
488-
self.union(rhs).cloned().collect()
489-
}
490-
}
491-
492409
impl<T: Show> Show for BTreeSet<T> {
493410
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
494411
try!(write!(f, "{{"));

0 commit comments

Comments
 (0)