Skip to content

Commit 8ac57cf

Browse files
author
Ariel Ben-Yehuda
committed
---
yaml --- r: 153837 b: refs/heads/try2 c: c6b992a h: refs/heads/master i: 153835: 5b6d20b v: v3
1 parent e2295fe commit 8ac57cf

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 79e9f14abf50eecb7d3c53f10ad900615bb2d397
8+
refs/heads/try2: c6b992a53f6a9f3eee0883640adc270910dc9d87
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/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/try2/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/try2/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)