Skip to content

Commit 7dbcd63

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163268 b: refs/heads/snap-stage3 c: 10a14d5 h: refs/heads/master v: v3
1 parent 2b48533 commit 7dbcd63

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5a9047b9b3109be22c219519120881189ca6b61d
4+
refs/heads/snap-stage3: 10a14d5f04e958918ae3cd3e3a2ef881e5dc0a6d
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/test/run-pass/assignability-trait.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
// making method calls, but only if there aren't any matches without
1313
// it.
1414

15+
#![feature(unboxed_closures)]
1516

1617
trait iterable<A> {
17-
fn iterate(&self, blk: |x: &A| -> bool) -> bool;
18+
fn iterate<F>(&self, blk: F) -> bool where F: FnMut(&A) -> bool;
1819
}
1920

2021
impl<'a,A> iterable<A> for &'a [A] {
21-
fn iterate(&self, f: |x: &A| -> bool) -> bool {
22+
fn iterate<F>(&self, f: F) -> bool where F: FnMut(&A) -> bool {
2223
self.iter().all(f)
2324
}
2425
}
2526

2627
impl<A> iterable<A> for Vec<A> {
27-
fn iterate(&self, f: |x: &A| -> bool) -> bool {
28+
fn iterate<F>(&self, f: F) -> bool where F: FnMut(&A) -> bool {
2829
self.iter().all(f)
2930
}
3031
}

0 commit comments

Comments
 (0)