diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-01-23 14:59:00 -0800 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-01-23 19:06:33 -0800 |
| commit | 5e13d19cc07a1e8fbf478d21cabbd7b9f80e3b54 (patch) | |
| tree | c1fc2dd89c651efa1daa4e7d63c5b82b2a5f4bd2 /src/comp | |
| parent | 04351a84ca342f4580e40b9c195b5403b864090b (diff) | |
| download | rust-5e13d19cc07a1e8fbf478d21cabbd7b9f80e3b54.tar.gz rust-5e13d19cc07a1e8fbf478d21cabbd7b9f80e3b54.zip | |
s/block()/fn()/g
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/metadata/cstore.rs | 2 | ||||
| -rw-r--r-- | src/comp/metadata/decoder.rs | 2 | ||||
| -rw-r--r-- | src/comp/metadata/encoder.rs | 2 | ||||
| -rw-r--r-- | src/comp/metadata/tydecode.rs | 4 | ||||
| -rw-r--r-- | src/comp/middle/alias.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/debuginfo.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/kind.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/last_use.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/lint.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/pat_util.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/resolve.rs | 4 | ||||
| -rw-r--r-- | src/comp/middle/trans.rs | 8 | ||||
| -rw-r--r-- | src/comp/middle/trans_closure.rs | 4 | ||||
| -rw-r--r-- | src/comp/middle/trans_impl.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/trans_vec.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/tstate/auxiliary.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/ty.rs | 9 | ||||
| -rw-r--r-- | src/comp/syntax/ext/simplext.rs | 4 | ||||
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 22 | ||||
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 6 | ||||
| -rw-r--r-- | src/comp/util/filesearch.rs | 2 |
21 files changed, 40 insertions, 47 deletions
diff --git a/src/comp/metadata/cstore.rs b/src/comp/metadata/cstore.rs index 3c75df586be..e3201834a3d 100644 --- a/src/comp/metadata/cstore.rs +++ b/src/comp/metadata/cstore.rs @@ -93,7 +93,7 @@ fn have_crate_data(cstore: cstore, cnum: ast::crate_num) -> bool { ret p(cstore).metas.contains_key(cnum); } -fn iter_crate_data(cstore: cstore, i: block(ast::crate_num, crate_metadata)) { +fn iter_crate_data(cstore: cstore, i: fn(ast::crate_num, crate_metadata)) { p(cstore).metas.items {|k,v| i(k, v);}; } diff --git a/src/comp/metadata/decoder.rs b/src/comp/metadata/decoder.rs index 9855fa75d42..bdd4623bbea 100644 --- a/src/comp/metadata/decoder.rs +++ b/src/comp/metadata/decoder.rs @@ -460,7 +460,7 @@ fn list_crate_items(bytes: @[u8], md: ebml::doc, out: io::writer) { out.write_str("\n"); } -fn iter_crate_items(bytes: @[u8], proc: block(str, ast::def_id)) { +fn iter_crate_items(bytes: @[u8], proc: fn(str, ast::def_id)) { let md = ebml::new_doc(bytes); let paths = ebml::get_doc(md, tag_paths); let index = ebml::get_doc(paths, tag_index); diff --git a/src/comp/metadata/encoder.rs b/src/comp/metadata/encoder.rs index 279f761dfb2..cc79e6a2bf0 100644 --- a/src/comp/metadata/encoder.rs +++ b/src/comp/metadata/encoder.rs @@ -486,7 +486,7 @@ fn create_index<T: copy>(index: [entry<T>], hash_fn: fn@(T) -> uint) -> } fn encode_index<T>(ebml_w: ebml::writer, buckets: [@[entry<T>]], - write_fn: block(io::writer, T)) { + write_fn: fn(io::writer, T)) { let writer = ebml_w.writer; ebml::start_tag(ebml_w, tag_index); let bucket_locs: [uint] = []; diff --git a/src/comp/metadata/tydecode.rs b/src/comp/metadata/tydecode.rs index 266b319fe29..2e4e5cdc66d 100644 --- a/src/comp/metadata/tydecode.rs +++ b/src/comp/metadata/tydecode.rs @@ -16,7 +16,7 @@ export parse_bounds_data; // data buffer. Whatever format you choose should not contain pipe characters. // Callback to translate defs to strs or back: -type conv_did = block(ast::def_id) -> ast::def_id; +type conv_did = fn(ast::def_id) -> ast::def_id; type pstate = {data: @[u8], crate: int, mutable pos: uint, tcx: ty::ctxt}; @@ -138,7 +138,7 @@ fn parse_ty_constr_arg(st: @pstate) -> ast::constr_arg_general_<@path> { } fn parse_constr<T: copy>(st: @pstate, conv: conv_did, - pser: block(@pstate) -> ast::constr_arg_general_<T>) + pser: fn(@pstate) -> ast::constr_arg_general_<T>) -> @ty::constr_general<T> { let sp = ast_util::dummy_sp(); // FIXME: use a real span let args: [@sp_constr_arg<T>] = []; diff --git a/src/comp/middle/alias.rs b/src/comp/middle/alias.rs index d2c75bc182e..ea301228db6 100644 --- a/src/comp/middle/alias.rs +++ b/src/comp/middle/alias.rs @@ -436,7 +436,7 @@ fn check_if(c: @ast::expr, then: ast::blk, els: option::t<@ast::expr>, *sc.invalid = append_invalid(*sc.invalid, then_invalid, orig_invalid); } -fn check_loop(cx: ctx, sc: scope, checker: block()) { +fn check_loop(cx: ctx, sc: scope, checker: fn()) { let orig_invalid = filter_invalid(*sc.invalid, sc.bs); checker(); let new_invalid = filter_invalid(*sc.invalid, sc.bs); diff --git a/src/comp/middle/debuginfo.rs b/src/comp/middle/debuginfo.rs index cfde53fa820..fdc1c51cbd6 100644 --- a/src/comp/middle/debuginfo.rs +++ b/src/comp/middle/debuginfo.rs @@ -140,7 +140,7 @@ fn md_from_metadata<T>(val: debug_metadata) -> T unsafe { } fn cached_metadata<T: copy>(cache: metadata_cache, mdtag: int, - eq: block(md: T) -> bool) -> option::t<T> unsafe { + eq: fn(md: T) -> bool) -> option::t<T> unsafe { if cache.contains_key(mdtag) { let items = cache.get(mdtag); for item in items { diff --git a/src/comp/middle/kind.rs b/src/comp/middle/kind.rs index 600389b3058..db35362f3ea 100644 --- a/src/comp/middle/kind.rs +++ b/src/comp/middle/kind.rs @@ -58,7 +58,7 @@ fn check_crate(tcx: ty::ctxt, method_map: typeck::method_map, // variables. `id` is the node_id for some expression that creates the // closure. fn with_appropriate_checker(cx: ctx, id: node_id, - b: block(fn@(ctx, ty::t, sp: span))) { + b: fn(fn@(ctx, ty::t, sp: span))) { let fty = ty::node_id_to_monotype(cx.tcx, id); alt ty::ty_fn_proto(cx.tcx, fty) { proto_uniq { b(check_send); } diff --git a/src/comp/middle/last_use.rs b/src/comp/middle/last_use.rs index 60b8bfd9879..af078afe53f 100644 --- a/src/comp/middle/last_use.rs +++ b/src/comp/middle/last_use.rs @@ -203,7 +203,7 @@ fn visit_fn(fk: visit::fn_kind, decl: fn_decl, body: blk, } } -fn visit_block(tp: block_type, cx: ctx, visit: block()) { +fn visit_block(tp: block_type, cx: ctx, visit: fn()) { let local = @{type: tp, mutable second: false, mutable exits: []}; cx.blocks = cons(local, @cx.blocks); visit(); diff --git a/src/comp/middle/lint.rs b/src/comp/middle/lint.rs index 7cba82e80be..838764171f0 100644 --- a/src/comp/middle/lint.rs +++ b/src/comp/middle/lint.rs @@ -26,7 +26,7 @@ impl opt_ for option { } // FIXME: Copied from driver.rs, to work around a bug(#1566) -fn time(do_it: bool, what: str, thunk: block()) { +fn time(do_it: bool, what: str, thunk: fn()) { if !do_it{ ret thunk(); } let start = std::time::precise_time_s(); thunk(); diff --git a/src/comp/middle/pat_util.rs b/src/comp/middle/pat_util.rs index b949dce004d..9e50355f43e 100644 --- a/src/comp/middle/pat_util.rs +++ b/src/comp/middle/pat_util.rs @@ -91,7 +91,7 @@ fn pat_id_map(tcx: ty::ctxt, pat: @pat) -> pat_id_map { // This does *not* normalize. The pattern should be already normalized // if you want to get a normalized pattern out of it. // Could return a constrained type in order to express that (future work) -fn pat_bindings(pat: @pat, it: block(@pat)) { +fn pat_bindings(pat: @pat, it: fn(@pat)) { alt pat.node { pat_ident(_, option::none) { it(pat); } pat_ident(_, option::some(sub)) { it(pat); pat_bindings(sub, it); } diff --git a/src/comp/middle/resolve.rs b/src/comp/middle/resolve.rs index 3b49f8c33ad..1d54ed27997 100644 --- a/src/comp/middle/resolve.rs +++ b/src/comp/middle/resolve.rs @@ -632,7 +632,7 @@ fn resolve_constr(e: @env, c: @ast::constr, sc: scopes, _v: vt<scopes>) { fn resolve_import(e: env, defid: ast::def_id, name: ast::ident, ids: [ast::ident], sp: codemap::span, sc: scopes) { fn register(e: env, id: node_id, cx: ctxt, sp: codemap::span, - name: ast::ident, lookup: block(namespace) -> option::t<def>, + name: ast::ident, lookup: fn(namespace) -> option::t<def>, impls: [@_impl]) { let val = lookup(ns_val(ns_any_value)), typ = lookup(ns_type), md = lookup(ns_module); @@ -1712,7 +1712,7 @@ fn add_name(ch: checker, sp: span, name: ident) { fn ident_id(&&i: ident) -> ident { ret i; } -fn ensure_unique<T>(e: env, sp: span, elts: [T], id: block(T) -> ident, +fn ensure_unique<T>(e: env, sp: span, elts: [T], id: fn(T) -> ident, kind: str) { let ch = checker(e, kind); for elt: T in elts { add_name(ch, sp, id(elt)); } diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 8919237b688..8de5d7257e2 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -3233,8 +3233,8 @@ fn invoke_full(bcx: @block_ctxt, llfn: ValueRef, llargs: [ValueRef], fn invoke_(bcx: @block_ctxt, llfn: ValueRef, llargs: [ValueRef], to_zero: [{v: ValueRef, t: ty::t}], to_revoke: [{v: ValueRef, t: ty::t}], - invoker: block(@block_ctxt, ValueRef, [ValueRef], - BasicBlockRef, BasicBlockRef)) -> @block_ctxt { + invoker: fn(@block_ctxt, ValueRef, [ValueRef], + BasicBlockRef, BasicBlockRef)) -> @block_ctxt { // FIXME: May be worth turning this into a plain call when there are no // cleanups to run if bcx.unreachable { ret bcx; } @@ -4106,7 +4106,7 @@ fn trans_fn_cleanups(fcx: @fn_ctxt, cx: @block_ctxt) { } } -fn block_locals(b: ast::blk, it: block(@ast::local)) { +fn block_locals(b: ast::blk, it: fn(@ast::local)) { for s: @ast::stmt in b.node.stmts { alt s.node { ast::stmt_decl(d, _) { @@ -4423,7 +4423,7 @@ enum self_arg { impl_self(ty::t), no_self, } fn trans_closure(cx: @local_ctxt, sp: span, decl: ast::fn_decl, body: ast::blk, llfndecl: ValueRef, ty_self: self_arg, ty_params: [ast::ty_param], - id: ast::node_id, maybe_load_env: block(@fn_ctxt)) { + id: ast::node_id, maybe_load_env: fn(@fn_ctxt)) { set_uwtable(llfndecl); // Set up arguments to the function. diff --git a/src/comp/middle/trans_closure.rs b/src/comp/middle/trans_closure.rs index 7fece0cefdf..3f7c8181ab5 100644 --- a/src/comp/middle/trans_closure.rs +++ b/src/comp/middle/trans_closure.rs @@ -57,7 +57,7 @@ import shape::{size_of}; // closure is allocated in the task heap and is reference counted. // For a block, the closure is allocated on the stack. Note that in // all cases we allocate space for a ref count just to make our lives -// easier when upcasting to block(T)->U, in the shape code, and so +// easier when upcasting to fn(T)->U, in the shape code, and so // forth. // // ## Opaque Closures ## @@ -637,7 +637,7 @@ fn trans_bind_1(cx: @block_ctxt, outgoing_fty: ty::t, fn make_null_test( in_bcx: @block_ctxt, ptr: ValueRef, - blk: block(@block_ctxt) -> @block_ctxt) + blk: fn(@block_ctxt) -> @block_ctxt) -> @block_ctxt { let not_null_bcx = new_sub_block_ctxt(in_bcx, "not null"); let next_bcx = new_sub_block_ctxt(in_bcx, "next"); diff --git a/src/comp/middle/trans_impl.rs b/src/comp/middle/trans_impl.rs index 2e2e245a1c1..ff4a8db24a7 100644 --- a/src/comp/middle/trans_impl.rs +++ b/src/comp/middle/trans_impl.rs @@ -157,7 +157,7 @@ fn trans_vtable(ccx: @crate_ctxt, id: ast::node_id, name: str, } fn trans_wrapper(ccx: @crate_ctxt, pt: [ast::ident], llfty: TypeRef, - fill: block(ValueRef, @block_ctxt) -> @block_ctxt) + fill: fn(ValueRef, @block_ctxt) -> @block_ctxt) -> ValueRef { let lcx = @{path: pt, module_path: [], ccx: ccx}; let name = link::mangle_internal_name_by_path(ccx, pt); diff --git a/src/comp/middle/trans_vec.rs b/src/comp/middle/trans_vec.rs index 68207867071..c31da3cfecd 100644 --- a/src/comp/middle/trans_vec.rs +++ b/src/comp/middle/trans_vec.rs @@ -258,7 +258,7 @@ fn trans_add(bcx: @block_ctxt, vec_ty: ty::t, lhs: ValueRef, type val_and_ty_fn = fn@(@block_ctxt, ValueRef, ty::t) -> result; -type iter_vec_block = block(@block_ctxt, ValueRef, ty::t) -> @block_ctxt; +type iter_vec_block = fn(@block_ctxt, ValueRef, ty::t) -> @block_ctxt; fn iter_vec_raw(bcx: @block_ctxt, vptr: ValueRef, vec_ty: ty::t, fill: ValueRef, f: iter_vec_block) -> @block_ctxt { diff --git a/src/comp/middle/tstate/auxiliary.rs b/src/comp/middle/tstate/auxiliary.rs index c6af04460ff..b367b5b6cb3 100644 --- a/src/comp/middle/tstate/auxiliary.rs +++ b/src/comp/middle/tstate/auxiliary.rs @@ -968,7 +968,7 @@ fn non_init_constraint_mentions(_fcx: fn_ctxt, c: norm_constraint, v: node_id) } fn args_mention<T>(args: [@constr_arg_use], - q: block([T], node_id) -> bool, + q: fn([T], node_id) -> bool, s: [T]) -> bool { /* FIXME diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index b7751fc235e..2af258d120a 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -1083,7 +1083,7 @@ fn type_is_native(cx: ctxt, ty: t) -> bool { alt struct(cx, ty) { ty_native(_) { ret true; } _ { ret false; } } } -fn type_structurally_contains(cx: ctxt, ty: t, test: block(sty) -> bool) -> +fn type_structurally_contains(cx: ctxt, ty: t, test: fn(sty) -> bool) -> bool { let sty = struct(cx, ty); if test(sty) { ret true; } @@ -1420,7 +1420,7 @@ fn hash_type_structure(st: sty) -> uint { fn hash_raw_ty(&&rt: @raw_t) -> uint { ret rt.hash; } -fn arg_eq<T>(eq: block(T, T) -> bool, +fn arg_eq<T>(eq: fn(T, T) -> bool, a: @sp_constr_arg<T>, b: @sp_constr_arg<T>) -> bool { @@ -1439,7 +1439,7 @@ fn arg_eq<T>(eq: block(T, T) -> bool, } } -fn args_eq<T>(eq: block(T, T) -> bool, +fn args_eq<T>(eq: fn(T, T) -> bool, a: [@sp_constr_arg<T>], b: [@sp_constr_arg<T>]) -> bool { let i: uint = 0u; @@ -1930,7 +1930,6 @@ mod unify { fn sub_proto(p_sub: ast::proto, p_sup: ast::proto) -> bool { ret alt (p_sub, p_sup) { (_, ast::proto_any) { true } - (_, ast::proto_block) { true } /* NDM temporary */ (ast::proto_bare, _) { true } // Equal prototypes are always subprotos: @@ -2083,7 +2082,7 @@ mod unify { } fn unify_tps(cx: @ctxt, expected_tps: [t], actual_tps: [t], - variance: variance, finish: block([t]) -> result) -> result { + variance: variance, finish: fn([t]) -> result) -> result { let result_tps = [], i = 0u; for exp in expected_tps { let act = actual_tps[i]; diff --git a/src/comp/syntax/ext/simplext.rs b/src/comp/syntax/ext/simplext.rs index dcaf16c973e..5477c495883 100644 --- a/src/comp/syntax/ext/simplext.rs +++ b/src/comp/syntax/ext/simplext.rs @@ -241,7 +241,7 @@ fn follow_for_trans(cx: ext_ctxt, mmaybe: option::t<arb_depth<matchable>>, } /* helper for transcribe_exprs: what vars from `b` occur in `e`? */ -fn free_vars(b: bindings, e: @expr, it: block(ident)) { +fn free_vars(b: bindings, e: @expr, it: fn(ident)) { let idents: hashmap<ident, ()> = new_str_hash::<()>(); fn mark_ident(&&i: ident, _fld: ast_fold, b: bindings, idents: hashmap<ident, ()>) -> ident { @@ -536,7 +536,7 @@ fn block_to_ident(blk: blk_) -> option::t<ident> { fn p_t_s_r_mac(cx: ext_ctxt, mac: ast::mac, s: selector, b: binders) { fn select_pt_1(cx: ext_ctxt, m: matchable, - fn_m: block(ast::mac) -> match_result) -> match_result { + fn_m: fn(ast::mac) -> match_result) -> match_result { ret alt m { match_expr(e) { alt e.node { expr_mac(mac) { fn_m(mac) } _ { none } } diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index cb7e1144334..5a4925486d9 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -149,7 +149,7 @@ fn bad_expr_word_table() -> hashmap<str, ()> { for word in ["mod", "if", "else", "while", "do", "alt", "for", "break", "cont", "ret", "be", "fail", "type", "resource", "check", "assert", "claim", "native", "fn", "pure", - "unsafe", "block", "import", "export", "let", "const", + "unsafe", "import", "export", "let", "const", "log", "copy", "sendfn", "impl", "iface", "enum"] { words.insert(word, ()); } @@ -366,7 +366,7 @@ fn parse_constr_in_type(p: parser) -> @ast::ty_constr { } -fn parse_constrs<T: copy>(pser: block(parser) -> @ast::constr_general<T>, +fn parse_constrs<T: copy>(pser: fn(parser) -> @ast::constr_general<T>, p: parser) -> [@ast::constr_general<T>] { let constrs: [@ast::constr_general<T>] = []; @@ -504,9 +504,6 @@ fn parse_ty(p: parser, colons_before_params: bool) -> @ast::ty { _ { /* fallthrough */ } } t = parse_ty_fn(proto, p); - } else if eat_word(p, "block") { - //p.warn("block is deprecated, use fn& or fn"); - t = parse_ty_fn(ast::proto_block, p); } else if eat_word(p, "native") { expect_word(p, "fn"); t = parse_ty_fn(ast::proto_bare, p); @@ -545,7 +542,7 @@ fn parse_fn_block_arg(p: parser) -> ast::arg { } fn parse_seq_to_before_gt<T: copy>(sep: option::t<token::token>, - f: block(parser) -> T, + f: fn(parser) -> T, p: parser) -> [T] { let first = true; let v = []; @@ -562,7 +559,7 @@ fn parse_seq_to_before_gt<T: copy>(sep: option::t<token::token>, } fn parse_seq_to_gt<T: copy>(sep: option::t<token::token>, - f: block(parser) -> T, p: parser) -> [T] { + f: fn(parser) -> T, p: parser) -> [T] { let v = parse_seq_to_before_gt(sep, f, p); expect_gt(p); @@ -570,7 +567,7 @@ fn parse_seq_to_gt<T: copy>(sep: option::t<token::token>, } fn parse_seq_lt_gt<T: copy>(sep: option::t<token::token>, - f: block(parser) -> T, + f: fn(parser) -> T, p: parser) -> spanned<[T]> { let lo = p.span.lo; expect(p, token::LT); @@ -581,7 +578,7 @@ fn parse_seq_lt_gt<T: copy>(sep: option::t<token::token>, } fn parse_seq_to_end<T: copy>(ket: token::token, sep: seq_sep, - f: block(parser) -> T, p: parser) -> [T] { + f: fn(parser) -> T, p: parser) -> [T] { let val = parse_seq_to_before_end(ket, sep, f, p); p.bump(); ret val; @@ -604,7 +601,7 @@ fn seq_sep_none() -> seq_sep { fn parse_seq_to_before_end<T: copy>(ket: token::token, sep: seq_sep, - f: block(parser) -> T, p: parser) -> [T] { + f: fn(parser) -> T, p: parser) -> [T] { let first: bool = true; let v: [T] = []; while p.token != ket { @@ -620,7 +617,7 @@ fn parse_seq_to_before_end<T: copy>(ket: token::token, fn parse_seq<T: copy>(bra: token::token, ket: token::token, - sep: seq_sep, f: block(parser) -> T, + sep: seq_sep, f: fn(parser) -> T, p: parser) -> spanned<[T]> { let lo = p.span.lo; expect(p, bra); @@ -813,9 +810,6 @@ fn parse_bottom_expr(p: parser) -> pexpr { _ { /* fallthrough */ } } ret pexpr(parse_fn_expr(p, proto)); - } else if eat_word(p, "block") { - p.warn("block is deprecated, use fn& or fn"); - ret pexpr(parse_fn_expr(p, ast::proto_block)); } else if eat_word(p, "unchecked") { ret pexpr(parse_block_expr(p, lo, ast::unchecked_blk)); } else if eat_word(p, "unsafe") { diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 2ebcaa055a7..4327ccf9ac0 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -210,7 +210,7 @@ fn synth_comment(s: ps, text: str) { word(s.s, "*/"); } -fn commasep<IN>(s: ps, b: breaks, elts: [IN], op: block(ps, IN)) { +fn commasep<IN>(s: ps, b: breaks, elts: [IN], op: fn(ps, IN)) { box(s, 0u, b); let first = true; for elt: IN in elts { @@ -221,8 +221,8 @@ fn commasep<IN>(s: ps, b: breaks, elts: [IN], op: block(ps, IN)) { } -fn commasep_cmnt<IN>(s: ps, b: breaks, elts: [IN], op: block(ps, IN), - get_span: block(IN) -> codemap::span) { +fn commasep_cmnt<IN>(s: ps, b: breaks, elts: [IN], op: fn(ps, IN), + get_span: fn(IN) -> codemap::span) { box(s, 0u, b); let len = vec::len::<IN>(elts); let i = 0u; diff --git a/src/comp/util/filesearch.rs b/src/comp/util/filesearch.rs index ece3f17e747..60df64a2a35 100644 --- a/src/comp/util/filesearch.rs +++ b/src/comp/util/filesearch.rs @@ -18,7 +18,7 @@ export relative_target_lib_path; export get_cargo_root; export libdir; -type pick<T> = block(path: fs::path) -> option::t<T>; +type pick<T> = fn(path: fs::path) -> option::t<T>; fn pick_file(file: fs::path, path: fs::path) -> option::t<fs::path> { if fs::basename(path) == file { option::some(path) } |
