Skip to content

Commit 91b6dc5

Browse files
committed
Merge remote-tracking branch 'erickt/master'
Conflicts: src/libcore/vec.rs src/libstd/getopts.rs
2 parents 6be25c8 + 29ba196 commit 91b6dc5

File tree

8 files changed

+458
-30
lines changed

8 files changed

+458
-30
lines changed

doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,8 @@ for the parameter list, as in `{|| ...}`.
922922
Partial application is done using the `bind` keyword in Rust.
923923

924924
~~~~
925-
let daynum = bind vec::position(_, ["mo", "tu", "we", "do",
926-
"fr", "sa", "su"]);
925+
let daynum = bind vec::position_elt(["mo", "tu", "we", "do",
926+
"fr", "sa", "su"], _);
927927
~~~~
928928

929929
Binding a function produces a boxed closure (`fn@` type) in which some

src/comp/middle/alias.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ fn filter_invalid(src: list<@invalid>, bs: [binding]) -> list<@invalid> {
702702
while cur != list::nil {
703703
alt cur {
704704
list::cons(head, tail) {
705-
let p = vec::position_pred(bs, {|b| b.node_id == head.node_id});
705+
let p = vec::position(bs, {|b| b.node_id == head.node_id});
706706
if !is_none(p) { out = list::cons(head, @out); }
707707
cur = *tail;
708708
}

src/comp/middle/shape.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint]) -> [u8] {
426426
}
427427
ty::ty_param(n, _) {
428428
// Find the type parameter in the parameter list.
429-
alt vec::position(n, ty_param_map) {
429+
alt vec::position_elt(ty_param_map, n) {
430430
some(i) { s += [shape_var, i as u8]; }
431431
none { fail "ty param not found in ty_param_map"; }
432432
}

src/comp/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3395,7 +3395,7 @@ fn trans_rec(bcx: @block_ctxt, fields: [ast::field],
33953395
have a record type") } };
33963396
let temp_cleanups = [];
33973397
for fld in fields {
3398-
let ix = option::get(vec::position_pred(ty_fields, {|ft|
3398+
let ix = option::get(vec::position(ty_fields, {|ft|
33993399
str::eq(fld.node.ident, ft.ident)
34003400
}));
34013401
let dst = GEP_tup_like_1(bcx, t, addr, [0, ix as int]);

src/comp/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ fn lookup_method(fcx: @fn_ctxt, isc: resolve::iscopes,
14801480
}
14811481
};
14821482
let ifce_methods = ty::iface_methods(tcx, iid);
1483-
alt vec::position_pred(*ifce_methods, {|m| m.ident == name}) {
1483+
alt vec::position(*ifce_methods, {|m| m.ident == name}) {
14841484
some(pos) {
14851485
let m = ifce_methods[pos];
14861486
ret some({method_ty: ty::mk_fn(tcx, m.fty),

0 commit comments

Comments
 (0)