diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-10-18 15:07:40 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-10-20 18:23:48 -0700 |
| commit | 29ad3bdb103bec8d45df6f015802668722af6a00 (patch) | |
| tree | 81154dcf545b6848eb54cc780aa44273cb61aefb /src/comp/metadata | |
| parent | f324704c0a010a2ba89bec67d89eb6eccfa4e412 (diff) | |
| download | rust-29ad3bdb103bec8d45df6f015802668722af6a00.tar.gz rust-29ad3bdb103bec8d45df6f015802668722af6a00.zip | |
Make fn denote a bare function. Convert fn to fn@ as needed
Diffstat (limited to 'src/comp/metadata')
| -rw-r--r-- | src/comp/metadata/decoder.rs | 4 | ||||
| -rw-r--r-- | src/comp/metadata/tydecode.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/metadata/decoder.rs b/src/comp/metadata/decoder.rs index 8d3f8f5d824..fe97845a448 100644 --- a/src/comp/metadata/decoder.rs +++ b/src/comp/metadata/decoder.rs @@ -28,9 +28,9 @@ export external_resolver; // def_id for an item defined in another crate, somebody needs to figure out // what crate that's in and give us a def_id that makes sense for the current // build. -type external_resolver = fn(ast::def_id) -> ast::def_id; +type external_resolver = fn@(ast::def_id) -> ast::def_id; -fn lookup_hash(d: ebml::doc, eq_fn: fn([u8]) -> bool, hash: uint) -> +fn lookup_hash(d: ebml::doc, eq_fn: fn@([u8]) -> bool, hash: uint) -> [ebml::doc] { let index = ebml::get_doc(d, tag_index); let table = ebml::get_doc(index, tag_index_table); diff --git a/src/comp/metadata/tydecode.rs b/src/comp/metadata/tydecode.rs index 2e6a83c153d..4d56d5ae6ad 100644 --- a/src/comp/metadata/tydecode.rs +++ b/src/comp/metadata/tydecode.rs @@ -16,7 +16,7 @@ export parse_ty_data; // data buffer. Whatever format you choose should not contain pipe characters. // Callback to translate defs to strs or back: -type str_def = fn(str) -> ast::def_id; +type str_def = fn@(str) -> ast::def_id; type pstate = {data: @[u8], crate: int, mutable pos: uint, len: uint, tcx: ty::ctxt}; @@ -34,7 +34,7 @@ fn parse_ident(st: @pstate, sd: str_def, last: char) -> ast::ident { ret parse_ident_(st, sd, bind is_last(last, _)); } -fn parse_ident_(st: @pstate, _sd: str_def, is_last: fn(char) -> bool) -> +fn parse_ident_(st: @pstate, _sd: str_def, is_last: fn@(char) -> bool) -> ast::ident { let rslt = ""; while !is_last(peek(st) as char) { |
