Skip to content

Commit f0595b5

Browse files
committed
---
yaml --- r: 161594 b: refs/heads/snap-stage3 c: 6e18b5a h: refs/heads/master v: v3
1 parent c203009 commit f0595b5

Some content is hidden

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

98 files changed

+322
-449
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a243e8820a2bc61866e6d644f56c2f96096e17bb
4+
refs/heads/snap-stage3: 6e18b5af9336947ec5d41e66d216c52c12bf74a3
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/doc/reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ An example of `use` declarations:
994994

995995
```
996996
use std::iter::range_step;
997-
use std::option::Option::{Some, None};
997+
use std::option::{Some, None};
998998
use std::collections::hash_map::{mod, HashMap};
999999
10001000
fn foo<T>(_: T){}
@@ -1004,8 +1004,8 @@ fn main() {
10041004
// Equivalent to 'std::iter::range_step(0u, 10u, 2u);'
10051005
range_step(0u, 10u, 2u);
10061006
1007-
// Equivalent to 'foo(vec![std::option::Option::Some(1.0f64),
1008-
// std::option::Option::None]);'
1007+
// Equivalent to 'foo(vec![std::option::Some(1.0f64),
1008+
// std::option::None]);'
10091009
foo(vec![Some(1.0f64), None]);
10101010
10111011
// Both `hash_map` and `HashMap` are in scope.

branches/snap-stage3/src/etc/unicode.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def escape_char(c):
292292
def emit_bsearch_range_table(f):
293293
f.write("""
294294
fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool {
295-
use core::cmp::Ordering::{Equal, Less, Greater};
295+
use core::cmp::{Equal, Less, Greater};
296296
use core::slice::SlicePrelude;
297297
r.binary_search(|&(lo,hi)| {
298298
if lo <= c && c <= hi { Equal }
@@ -350,11 +350,10 @@ def emit_regex_module(f, cats, w_data):
350350
def emit_conversions_module(f, lowerupper, upperlower):
351351
f.write("pub mod conversions {")
352352
f.write("""
353-
use core::cmp::Ordering::{Equal, Less, Greater};
353+
use core::cmp::{Equal, Less, Greater};
354354
use core::slice::SlicePrelude;
355355
use core::tuple::Tuple2;
356-
use core::option::Option;
357-
use core::option::Option::{Some, None};
356+
use core::option::{Option, Some, None};
358357
use core::slice;
359358
360359
pub fn to_lower(c: char) -> char {
@@ -404,7 +403,7 @@ def emit_grapheme_module(f, grapheme_table, grapheme_cats):
404403
f.write(""" }
405404
406405
fn bsearch_range_value_table(c: char, r: &'static [(char, char, GraphemeCat)]) -> GraphemeCat {
407-
use core::cmp::Ordering::{Equal, Less, Greater};
406+
use core::cmp::{Equal, Less, Greater};
408407
match r.binary_search(|&(lo, hi, _)| {
409408
if lo <= c && c <= hi { Equal }
410409
else if hi < c { Less }
@@ -431,13 +430,12 @@ def emit_grapheme_module(f, grapheme_table, grapheme_cats):
431430

432431
def emit_charwidth_module(f, width_table):
433432
f.write("pub mod charwidth {\n")
434-
f.write(" use core::option::Option;\n")
435-
f.write(" use core::option::Option::{Some, None};\n")
433+
f.write(" use core::option::{Option, Some, None};\n")
436434
f.write(" use core::slice::SlicePrelude;\n")
437435
f.write(" use core::slice;\n")
438436
f.write("""
439437
fn bsearch_range_value_table(c: char, is_cjk: bool, r: &'static [(char, char, u8, u8)]) -> u8 {
440-
use core::cmp::Ordering::{Equal, Less, Greater};
438+
use core::cmp::{Equal, Less, Greater};
441439
match r.binary_search(|&(lo, hi, _, _)| {
442440
if lo <= c && c <= hi { Equal }
443441
else if hi < c { Less }
@@ -532,7 +530,7 @@ def comp_pfun(char):
532530

533531
f.write("""
534532
fn bsearch_range_value_table(c: char, r: &'static [(char, char, u8)]) -> u8 {
535-
use core::cmp::Ordering::{Equal, Less, Greater};
533+
use core::cmp::{Equal, Less, Greater};
536534
use core::slice::SlicePrelude;
537535
use core::slice;
538536
match r.binary_search(|&(lo, hi, _)| {

branches/snap-stage3/src/liballoc/arc.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ use core::kinds::{Sync, Send};
2222
use core::mem::{min_align_of, size_of, drop};
2323
use core::mem;
2424
use core::ops::{Drop, Deref};
25-
use core::option::Option;
26-
use core::option::Option::{Some, None};
25+
use core::option::{Some, None, Option};
2726
use core::ptr::RawPtr;
2827
use core::ptr;
2928
use heap::deallocate;
@@ -327,8 +326,7 @@ mod tests {
327326
use std::comm::channel;
328327
use std::mem::drop;
329328
use std::ops::Drop;
330-
use std::option::Option;
331-
use std::option::Option::{Some, None};
329+
use std::option::{Option, Some, None};
332330
use std::str::Str;
333331
use std::sync::atomic;
334332
use std::task;

branches/snap-stage3/src/liballoc/boxed.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ use core::kinds::Sized;
1919
use core::mem;
2020
use core::option::Option;
2121
use core::raw::TraitObject;
22-
use core::result::Result;
23-
use core::result::Result::{Ok, Err};
22+
use core::result::{Ok, Err, Result};
2423

2524
/// A value that represents the global exchange heap. This is the default
2625
/// place that the `box` keyword allocates into when no place is supplied.

branches/snap-stage3/src/liballoc/heap.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ mod imp {
177177

178178
#[cfg(all(not(external_funcs), not(external_crate), jemalloc))]
179179
mod imp {
180-
use core::option::Option;
181-
use core::option::Option::None;
180+
use core::option::{None, Option};
182181
use core::ptr::{null_mut, null};
183182
use core::num::Int;
184183
use libc::{c_char, c_int, c_void, size_t};

branches/snap-stage3/src/liballoc/rc.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,10 @@ use core::fmt;
149149
use core::kinds::marker;
150150
use core::mem::{transmute, min_align_of, size_of, forget};
151151
use core::ops::{Deref, Drop};
152-
use core::option::Option;
153-
use core::option::Option::{Some, None};
152+
use core::option::{Option, Some, None};
154153
use core::ptr;
155154
use core::ptr::RawPtr;
156-
use core::result::Result;
157-
use core::result::Result::{Ok, Err};
155+
use core::result::{Result, Ok, Err};
158156

159157
use heap::deallocate;
160158

@@ -741,9 +739,8 @@ impl<T> RcBoxPtr<T> for Weak<T> {
741739
mod tests {
742740
use super::{Rc, Weak, weak_count, strong_count};
743741
use std::cell::RefCell;
744-
use std::option::Option;
745-
use std::option::Option::{Some, None};
746-
use std::result::Result::{Err, Ok};
742+
use std::option::{Option, Some, None};
743+
use std::result::{Err, Ok};
747744
use std::mem::drop;
748745
use std::clone::Clone;
749746

branches/snap-stage3/src/libcollections/btree/set.rs

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -94,92 +94,26 @@ impl<T> BTreeSet<T> {
9494

9595
impl<T: Ord> BTreeSet<T> {
9696
/// Visits the values representing the difference, in ascending order.
97-
///
98-
/// # Example
99-
///
100-
/// ```
101-
/// use std::collections::BTreeSet;
102-
///
103-
/// let mut a = BTreeSet::new();
104-
/// a.insert(1u);
105-
/// a.insert(2u);
106-
///
107-
/// let mut b = BTreeSet::new();
108-
/// b.insert(2u);
109-
/// b.insert(3u);
110-
///
111-
/// let diff: Vec<uint> = a.difference(&b).cloned().collect();
112-
/// assert_eq!(diff, vec![1u]);
113-
/// ```
11497
#[unstable = "matches collection reform specification, waiting for dust to settle"]
11598
pub fn difference<'a>(&'a self, other: &'a BTreeSet<T>) -> DifferenceItems<'a, T> {
11699
DifferenceItems{a: self.iter().peekable(), b: other.iter().peekable()}
117100
}
118101

119102
/// Visits the values representing the symmetric difference, in ascending order.
120-
///
121-
/// # Example
122-
///
123-
/// ```
124-
/// use std::collections::BTreeSet;
125-
///
126-
/// let mut a = BTreeSet::new();
127-
/// a.insert(1u);
128-
/// a.insert(2u);
129-
///
130-
/// let mut b = BTreeSet::new();
131-
/// b.insert(2u);
132-
/// b.insert(3u);
133-
///
134-
/// let sym_diff: Vec<uint> = a.symmetric_difference(&b).cloned().collect();
135-
/// assert_eq!(sym_diff, vec![1u,3]);
136-
/// ```
137103
#[unstable = "matches collection reform specification, waiting for dust to settle"]
138104
pub fn symmetric_difference<'a>(&'a self, other: &'a BTreeSet<T>)
139105
-> SymDifferenceItems<'a, T> {
140106
SymDifferenceItems{a: self.iter().peekable(), b: other.iter().peekable()}
141107
}
142108

143109
/// Visits the values representing the intersection, in ascending order.
144-
///
145-
/// # Example
146-
///
147-
/// ```
148-
/// use std::collections::BTreeSet;
149-
///
150-
/// let mut a = BTreeSet::new();
151-
/// a.insert(1u);
152-
/// a.insert(2u);
153-
///
154-
/// let mut b = BTreeSet::new();
155-
/// b.insert(2u);
156-
/// b.insert(3u);
157-
///
158-
/// let intersection: Vec<uint> = a.intersection(&b).cloned().collect();
159-
/// assert_eq!(intersection, vec![2u]);
160-
/// ```
161110
#[unstable = "matches collection reform specification, waiting for dust to settle"]
162111
pub fn intersection<'a>(&'a self, other: &'a BTreeSet<T>)
163112
-> IntersectionItems<'a, T> {
164113
IntersectionItems{a: self.iter().peekable(), b: other.iter().peekable()}
165114
}
166115

167116
/// Visits the values representing the union, in ascending order.
168-
///
169-
/// # Example
170-
///
171-
/// ```
172-
/// use std::collections::BTreeSet;
173-
///
174-
/// let mut a = BTreeSet::new();
175-
/// a.insert(1u);
176-
///
177-
/// let mut b = BTreeSet::new();
178-
/// b.insert(2u);
179-
///
180-
/// let union: Vec<uint> = a.union(&b).cloned().collect();
181-
/// assert_eq!(union, vec![1u,2]);
182-
/// ```
183117
#[unstable = "matches collection reform specification, waiting for dust to settle"]
184118
pub fn union<'a>(&'a self, other: &'a BTreeSet<T>) -> UnionItems<'a, T> {
185119
UnionItems{a: self.iter().peekable(), b: other.iter().peekable()}

branches/snap-stage3/src/libcollections/str.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -833,10 +833,8 @@ mod tests {
833833
use std::default::Default;
834834
use std::char::Char;
835835
use std::clone::Clone;
836-
use std::cmp::{Ord, PartialOrd, Equiv};
837-
use std::cmp::Ordering::{Equal, Greater, Less};
838-
use std::option::Option;
839-
use std::option::Option::{Some, None};
836+
use std::cmp::{Equal, Greater, Less, Ord, PartialOrd, Equiv};
837+
use std::option::{Some, None};
840838
use std::ptr::RawPtr;
841839
use std::iter::{Iterator, IteratorExt, DoubleEndedIteratorExt};
842840

branches/snap-stage3/src/libcore/any.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@
7272
#![stable]
7373

7474
use mem::{transmute};
75-
use option::Option;
76-
use option::Option::{Some, None};
75+
use option::{Option, Some, None};
7776
use raw::TraitObject;
7877
use intrinsics::TypeId;
7978

branches/snap-stage3/src/libcore/cell.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ use cmp::PartialEq;
160160
use default::Default;
161161
use kinds::{marker, Copy};
162162
use ops::{Deref, DerefMut, Drop};
163-
use option::Option;
164-
use option::Option::{None, Some};
163+
use option::{None, Option, Some};
165164

166165
/// A mutable memory location that admits only `Copy` data.
167166
#[unstable = "likely to be renamed; otherwise stable"]

branches/snap-stage3/src/libcore/char.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
#![doc(primitive = "char")]
1717

1818
use mem::transmute;
19-
use option::Option;
20-
use option::Option::{None, Some};
19+
use option::{None, Option, Some};
2120
use iter::{range_step, Iterator, RangeStep};
2221
use slice::SlicePrelude;
2322

branches/snap-stage3/src/libcore/cmp.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
pub use self::Ordering::*;
4545

4646
use kinds::Sized;
47-
use option::Option;
48-
use option::Option::{Some, None};
47+
use option::{Option, Some, None};
4948

5049
/// Trait for values that can be compared for equality and inequality.
5150
///
@@ -289,11 +288,10 @@ pub fn partial_max<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
289288

290289
// Implementation of PartialEq, Eq, PartialOrd and Ord for primitive types
291290
mod impls {
292-
use cmp::{PartialOrd, Ord, PartialEq, Eq, Ordering};
293-
use cmp::Ordering::{Less, Greater, Equal};
291+
use cmp::{PartialOrd, Ord, PartialEq, Eq, Ordering,
292+
Less, Greater, Equal};
294293
use kinds::Sized;
295-
use option::Option;
296-
use option::Option::{Some, None};
294+
use option::{Option, Some, None};
297295

298296
macro_rules! partial_eq_impl(
299297
($($t:ty)*) => ($(

branches/snap-stage3/src/libcore/fmt/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use fmt;
2020
use iter::{range, DoubleEndedIteratorExt};
2121
use num::{Float, FPNaN, FPInfinite, ToPrimitive};
2222
use num::cast;
23-
use result::Result::Ok;
23+
use result::Ok;
2424
use slice::{mod, SlicePrelude};
2525
use str::StrPrelude;
2626

branches/snap-stage3/src/libcore/fmt/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ use cell::{Cell, Ref, RefMut};
1717
use iter::{Iterator, IteratorExt, range};
1818
use kinds::{Copy, Sized};
1919
use mem;
20-
use option::Option;
21-
use option::Option::{Some, None};
20+
use option::{Option, Some, None};
2221
use ops::Deref;
23-
use result::Result::{Ok, Err};
22+
use result::{Ok, Err};
2423
use result;
2524
use slice::SlicePrelude;
2625
use slice;

branches/snap-stage3/src/libcore/iter.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ use cmp::Ord;
6262
use mem;
6363
use num::{ToPrimitive, Int};
6464
use ops::{Add, Deref};
65-
use option::Option;
66-
use option::Option::{Some, None};
65+
use option::{Option, Some, None};
6766
use uint;
6867

6968
#[deprecated = "renamed to Extend"] pub use self::Extend as Extendable;
@@ -2459,9 +2458,7 @@ pub fn repeat<T: Clone>(elt: T) -> Repeat<T> {
24592458
pub mod order {
24602459
use cmp;
24612460
use cmp::{Eq, Ord, PartialOrd, PartialEq};
2462-
use cmp::Ordering::{Equal, Less, Greater};
2463-
use option::Option;
2464-
use option::Option::{Some, None};
2461+
use option::{Option, Some, None};
24652462
use super::Iterator;
24662463

24672464
/// Compare `a` and `b` for equality using `Eq`
@@ -2479,11 +2476,11 @@ pub mod order {
24792476
pub fn cmp<A: Ord, T: Iterator<A>, S: Iterator<A>>(mut a: T, mut b: S) -> cmp::Ordering {
24802477
loop {
24812478
match (a.next(), b.next()) {
2482-
(None, None) => return Equal,
2483-
(None, _ ) => return Less,
2484-
(_ , None) => return Greater,
2479+
(None, None) => return cmp::Equal,
2480+
(None, _ ) => return cmp::Less,
2481+
(_ , None) => return cmp::Greater,
24852482
(Some(x), Some(y)) => match x.cmp(&y) {
2486-
Equal => (),
2483+
cmp::Equal => (),
24872484
non_eq => return non_eq,
24882485
},
24892486
}
@@ -2495,11 +2492,11 @@ pub mod order {
24952492
-> Option<cmp::Ordering> {
24962493
loop {
24972494
match (a.next(), b.next()) {
2498-
(None, None) => return Some(Equal),
2499-
(None, _ ) => return Some(Less),
2500-
(_ , None) => return Some(Greater),
2495+
(None, None) => return Some(cmp::Equal),
2496+
(None, _ ) => return Some(cmp::Less),
2497+
(_ , None) => return Some(cmp::Greater),
25012498
(Some(x), Some(y)) => match x.partial_cmp(&y) {
2502-
Some(Equal) => (),
2499+
Some(cmp::Equal) => (),
25032500
non_eq => return non_eq,
25042501
},
25052502
}

branches/snap-stage3/src/libcore/num/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ use kinds::Copy;
3030
use mem::size_of;
3131
use ops::{Add, Sub, Mul, Div, Rem, Neg};
3232
use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr};
33-
use option::Option;
34-
use option::Option::{Some, None};
33+
use option::{Option, Some, None};
3534
use str::{FromStr, from_str, StrPrelude};
3635

3736
/// Simultaneous division and remainder

0 commit comments

Comments
 (0)