Skip to content

Commit 8eb11ca

Browse files
committed
---
yaml --- r: 63331 b: refs/heads/snap-stage3 c: 824a627 h: refs/heads/master i: 63329: b2ea4f6 63327: 677df6d v: v3
1 parent a523925 commit 8eb11ca

File tree

4 files changed

+2
-54
lines changed

4 files changed

+2
-54
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d68be89e6912a394beb12c2731bdc6240a81655b
4+
refs/heads/snap-stage3: 824a6277af9e614767e0570ecc282065256ac32a
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/old_iter.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ pub trait CopyableOrderedIter<A:Copy + Ord> {
5959
fn max(&self) -> A;
6060
}
6161

62-
pub trait CopyableNonstrictIter<A:Copy> {
63-
// Like "each", but copies out the value. If the receiver is mutated while
64-
// iterating over it, the semantics must not be memory-unsafe but are
65-
// otherwise undefined.
66-
fn each_val(&const self, f: &fn(A) -> bool) -> bool;
67-
}
68-
6962
// A trait for sequences that can be built by imperatively pushing elements
7063
// onto them.
7164
pub trait Buildable<A> {

branches/snap-stage3/src/libstd/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub use char::Char;
4747
pub use container::{Container, Mutable, Map, Set};
4848
pub use hash::Hash;
4949
pub use old_iter::{BaseIter, ReverseIter, ExtendedIter, EqIter};
50-
pub use old_iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter};
50+
pub use old_iter::{CopyableIter, CopyableOrderedIter};
5151
pub use iter::{Times, FromIter};
5252
pub use iterator::{Iterator, IteratorUtil};
5353
pub use num::{Num, NumCast};

branches/snap-stage3/src/libstd/vec.rs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,41 +2630,6 @@ impl<A:Copy + Ord> old_iter::CopyableOrderedIter<A> for @[A] {
26302630
fn max(&self) -> A { old_iter::max(self) }
26312631
}
26322632

2633-
impl<'self,A:Copy> old_iter::CopyableNonstrictIter<A> for &'self [A] {
2634-
fn each_val(&const self, f: &fn(A) -> bool) -> bool {
2635-
let mut i = 0;
2636-
while i < self.len() {
2637-
if !f(copy self[i]) { return false; }
2638-
i += 1;
2639-
}
2640-
return true;
2641-
}
2642-
}
2643-
2644-
// FIXME(#4148): This should be redundant
2645-
impl<A:Copy> old_iter::CopyableNonstrictIter<A> for ~[A] {
2646-
fn each_val(&const self, f: &fn(A) -> bool) -> bool {
2647-
let mut i = 0;
2648-
while i < uniq_len(self) {
2649-
if !f(copy self[i]) { return false; }
2650-
i += 1;
2651-
}
2652-
return true;
2653-
}
2654-
}
2655-
2656-
// FIXME(#4148): This should be redundant
2657-
impl<A:Copy> old_iter::CopyableNonstrictIter<A> for @[A] {
2658-
fn each_val(&const self, f: &fn(A) -> bool) -> bool {
2659-
let mut i = 0;
2660-
while i < self.len() {
2661-
if !f(copy self[i]) { return false; }
2662-
i += 1;
2663-
}
2664-
return true;
2665-
}
2666-
}
2667-
26682633
impl<A:Clone> Clone for ~[A] {
26692634
#[inline]
26702635
fn clone(&self) -> ~[A] {
@@ -4326,14 +4291,4 @@ mod tests {
43264291
}
43274292
assert_eq!(v, ~[~[1,2,3],~[1,3,2],~[2,1,3],~[2,3,1],~[3,1,2],~[3,2,1]]);
43284293
}
4329-
4330-
#[test]
4331-
fn test_each_val() {
4332-
use old_iter::CopyableNonstrictIter;
4333-
let mut i = 0;
4334-
for [1, 2, 3].each_val |v| {
4335-
i += v;
4336-
}
4337-
assert_eq!(i, 6);
4338-
}
43394294
}

0 commit comments

Comments
 (0)