Skip to content

Commit f24559a

Browse files
author
Ariel Ben-Yehuda
committed
---
yaml --- r: 125953 b: refs/heads/try c: c6b992a h: refs/heads/master i: 125951: 00fa109 v: v3
1 parent 55af0ff commit f24559a

File tree

5 files changed

+10
-66
lines changed

5 files changed

+10
-66
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f2fa55903e378368ed9173560f03a0ef16e371c2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: 79e9f14abf50eecb7d3c53f10ad900615bb2d397
5+
refs/heads/try: c6b992a53f6a9f3eee0883640adc270910dc9d87
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/doc/guide-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ differently.
118118
## Container iterators
119119

120120
Containers implement iteration over the contained elements by returning an
121-
iterator object. For example, for vector slices several iterators are available:
121+
iterator object. For example, vector slices several iterators available:
122122

123123
* `iter()` for immutable references to the elements
124124
* `mut_iter()` for mutable references to the elements

branches/try/src/libcollections/ringbuf.rs

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use core::cmp;
1919
use core::default::Default;
2020
use core::fmt;
2121
use core::iter::RandomAccessIterator;
22-
use core::iter;
23-
use std::hash::{Writer, Hash};
2422

2523
use {Deque, Collection, Mutable, MutableSeq};
2624
use vec::Vec;
@@ -452,21 +450,6 @@ impl<A: PartialEq> PartialEq for RingBuf<A> {
452450
}
453451
}
454452

455-
impl<A: PartialOrd> PartialOrd for RingBuf<A> {
456-
fn partial_cmp(&self, other: &RingBuf<A>) -> Option<Ordering> {
457-
iter::order::partial_cmp(self.iter(), other.iter())
458-
}
459-
}
460-
461-
impl<S: Writer, A: Hash<S>> Hash<S> for RingBuf<A> {
462-
fn hash(&self, state: &mut S) {
463-
self.len().hash(state);
464-
for elt in self.iter() {
465-
elt.hash(state);
466-
}
467-
}
468-
}
469-
470453
impl<A> FromIterator<A> for RingBuf<A> {
471454
fn from_iter<T: Iterator<A>>(iterator: T) -> RingBuf<A> {
472455
let (lower, _) = iterator.size_hint();
@@ -502,7 +485,6 @@ mod tests {
502485
use std::fmt::Show;
503486
use std::prelude::*;
504487
use std::gc::{GC, Gc};
505-
use std::hash;
506488
use test::Bencher;
507489
use test;
508490

@@ -930,37 +912,6 @@ mod tests {
930912
assert!(e == RingBuf::new());
931913
}
932914

933-
#[test]
934-
fn test_hash() {
935-
let mut x = RingBuf::new();
936-
let mut y = RingBuf::new();
937-
938-
x.push(1i);
939-
x.push(2);
940-
x.push(3);
941-
942-
y.push(0i);
943-
y.push(1i);
944-
y.pop_front();
945-
y.push(2);
946-
y.push(3);
947-
948-
assert!(hash::hash(&x) == hash::hash(&y));
949-
}
950-
951-
#[test]
952-
fn test_ord() {
953-
let x = RingBuf::new();
954-
let mut y = RingBuf::new();
955-
y.push(1i);
956-
y.push(2);
957-
y.push(3);
958-
assert!(x < y);
959-
assert!(y > x);
960-
assert!(x <= x);
961-
assert!(x >= x);
962-
}
963-
964915
#[test]
965916
fn test_show() {
966917
let ringbuf: RingBuf<int> = range(0i, 10).collect();

branches/try/src/librustc/middle/typeck/coherence.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,25 @@ fn get_base_type(inference_context: &InferCtxt,
6060
span: Span,
6161
original_type: t)
6262
-> Option<t> {
63-
let resolved_type;
64-
match resolve_type(inference_context,
65-
Some(span),
66-
original_type,
67-
resolve_ivar) {
68-
Ok(resulting_type) if !type_is_ty_var(resulting_type) => {
69-
resolved_type = resulting_type;
70-
}
63+
let resolved_type = match resolve_type(inference_context,
64+
Some(span),
65+
original_type,
66+
resolve_ivar) {
67+
Ok(resulting_type) if !type_is_ty_var(resulting_type) => resulting_type,
7168
_ => {
7269
inference_context.tcx.sess.span_fatal(span,
7370
"the type of this value must be known in order \
7471
to determine the base type");
7572
}
76-
}
73+
};
7774

7875
match get(resolved_type).sty {
7976
ty_enum(..) | ty_struct(..) | ty_unboxed_closure(..) => {
8077
debug!("(getting base type) found base type");
8178
Some(resolved_type)
8279
}
83-
// FIXME(14865) I would prefere to use `_` here, but that causes a
84-
// compiler error.
85-
ty_uniq(_) | ty_rptr(_, _) | ty_trait(..) if ty::type_is_trait(resolved_type) => {
80+
81+
_ if ty::type_is_trait(resolved_type) => {
8682
debug!("(getting base type) found base type (trait)");
8783
Some(resolved_type)
8884
}

branches/try/src/libstd/collections/hashmap.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,6 @@ impl<T: Hash + Eq> HashSet<T, RandomSipHasher> {
18501850
///
18511851
/// # Example
18521852
///
1853-
/// ```
18541853
/// use std::collections::HashSet;
18551854
/// let mut set: HashSet<int> = HashSet::new();
18561855
/// ```
@@ -1864,7 +1863,6 @@ impl<T: Hash + Eq> HashSet<T, RandomSipHasher> {
18641863
///
18651864
/// # Example
18661865
///
1867-
/// ```
18681866
/// use std::collections::HashSet;
18691867
/// let mut set: HashSet<int> = HashSet::with_capacity(10);
18701868
/// ```
@@ -1922,7 +1920,6 @@ impl<T: Eq + Hash<S>, S, H: Hasher<S>> HashSet<T, H> {
19221920
///
19231921
/// # Example
19241922
///
1925-
/// ```
19261923
/// use std::collections::HashSet;
19271924
/// let mut set: HashSet<int> = HashSet::new();
19281925
/// set.reserve(10);

0 commit comments

Comments
 (0)