Skip to content

Commit 2446a8a

Browse files
committed
---
yaml --- r: 22748 b: refs/heads/master c: 6748f78 h: refs/heads/master v: v3
1 parent 3233cd6 commit 2446a8a

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 14adb98b64d45c42c256d56e3f0fd167abd36434
2+
refs/heads/master: 6748f78cb1f360e2b151ed9eb3e487cf1c61ef0e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libsyntax/ext/pipes/pipec.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,12 @@ impl compile of gen_init for protocol {
319319
}
320320

321321
fn buffer_ty_path(cx: ext_ctxt) -> @ast::ty {
322-
let mut params = ~[];
322+
let mut params: ~[ast::ty_param] = ~[];
323323
for (copy self.states).each |s| {
324324
for s.ty_params.each |tp| {
325-
if !params.contains(tp) {
326-
vec::push(params, tp);
325+
alt params.find(|tpp| *tp.ident == *tpp.ident) {
326+
none { vec::push(params, tp) }
327+
_ { }
327328
}
328329
}
329330
}
@@ -334,11 +335,12 @@ impl compile of gen_init for protocol {
334335

335336
fn gen_buffer_type(cx: ext_ctxt) -> @ast::item {
336337
let ext_cx = cx;
337-
let mut params = ~[];
338+
let mut params: ~[ast::ty_param] = ~[];
338339
let fields = do (copy self.states).map_to_vec |s| {
339340
for s.ty_params.each |tp| {
340-
if !params.contains(tp) {
341-
vec::push(params, tp);
341+
alt params.find(|tpp| *tp.ident == *tpp.ident) {
342+
none { vec::push(params, tp) }
343+
_ { }
342344
}
343345
}
344346
let ty = s.to_ty(cx);

trunk/src/test/bench/task-perf-word-count-generic.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,12 @@ mod map_reduce {
143143
proto! ctrl_proto {
144144
open: send<K: copy send, V: copy send> {
145145
find_reducer(K) -> reducer_response<K, V>,
146-
mapper_done -> terminated
146+
mapper_done -> !
147147
}
148148

149149
reducer_response: recv<K: copy send, V: copy send> {
150150
reducer(chan<reduce_proto<V>>) -> open<K, V>
151151
}
152-
153-
terminated: send { }
154152
}
155153

156154
enum reduce_proto<V: copy send> { emit_val(V), done, ref, release }
@@ -261,7 +259,7 @@ mod map_reduce {
261259
while num_mappers > 0 {
262260
let (_ready, message, ctrls) = pipes::select(ctrl);
263261
alt option::unwrap(message) {
264-
ctrl_proto::mapper_done(_) {
262+
ctrl_proto::mapper_done {
265263
// #error("received mapper terminated.");
266264
num_mappers -= 1;
267265
ctrl = ctrls;

0 commit comments

Comments
 (0)