diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-18 21:41:37 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-19 10:52:59 -0700 |
| commit | 9cf271fe96b474d514b1052935db70c4056cf076 (patch) | |
| tree | 7a6fb31efeaa4de91317c16aca824153aaaf988c /src/rustc/metadata | |
| parent | 62b7f4d800325b46002c47d23b58a9f2b7fabb9b (diff) | |
| download | rust-9cf271fe96b474d514b1052935db70c4056cf076.tar.gz rust-9cf271fe96b474d514b1052935db70c4056cf076.zip | |
De-mode vec::each() and many of the str iteration routines
Note that the method foo.each() is not de-moded, nor the other vec routines.
Diffstat (limited to 'src/rustc/metadata')
| -rw-r--r-- | src/rustc/metadata/cstore.rs | 4 | ||||
| -rw-r--r-- | src/rustc/metadata/encoder.rs | 6 | ||||
| -rw-r--r-- | src/rustc/metadata/tyencode.rs | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/rustc/metadata/cstore.rs b/src/rustc/metadata/cstore.rs index be974cb75b5..937745eb3f6 100644 --- a/src/rustc/metadata/cstore.rs +++ b/src/rustc/metadata/cstore.rs @@ -99,8 +99,8 @@ fn get_crate_vers(cstore: cstore, cnum: ast::crate_num) -> ~str { fn set_crate_data(cstore: cstore, cnum: ast::crate_num, data: crate_metadata) { p(cstore).metas.insert(cnum, data); - do vec::iter(decoder::get_crate_module_paths(cstore.intr, data)) |dp| { - let (did, path) = dp; + for vec::each(decoder::get_crate_module_paths(cstore.intr, data)) |dp| { + let (did, path) = *dp; let d = {crate: cnum, node: did.node}; p(cstore).mod_path_map.insert(d, @path); } diff --git a/src/rustc/metadata/encoder.rs b/src/rustc/metadata/encoder.rs index 6b8a28235de..86ec0fe8747 100644 --- a/src/rustc/metadata/encoder.rs +++ b/src/rustc/metadata/encoder.rs @@ -267,7 +267,9 @@ fn encode_path(ecx: @encode_ctxt, ebml_w: ebml::Writer, path: ast_map::path, do ebml_w.wr_tag(tag_path) { ebml_w.wr_tagged_u32(tag_path_len, (vec::len(path) + 1u) as u32); - do vec::iter(path) |pe| { encode_path_elt(ecx, ebml_w, pe); } + for vec::each(path) |pe| { + encode_path_elt(ecx, ebml_w, *pe); + } encode_path_elt(ecx, ebml_w, name); } } @@ -768,7 +770,7 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::Writer, item: @item, // written. Here, we output the *real* type signatures. I feel like // maybe we should only ever handle the real type signatures. for vec::each(ms) |m| { - let ty_m = ast_util::trait_method_to_ty_method(m); + let ty_m = ast_util::trait_method_to_ty_method(*m); if ty_m.self_ty.node != ast::sty_static { loop; } vec::push(*index, {val: ty_m.id, pos: ebml_w.writer.tell()}); diff --git a/src/rustc/metadata/tyencode.rs b/src/rustc/metadata/tyencode.rs index 6dc9810e296..df67749bc08 100644 --- a/src/rustc/metadata/tyencode.rs +++ b/src/rustc/metadata/tyencode.rs @@ -366,7 +366,7 @@ fn enc_ty_fn(w: io::Writer, cx: @ctxt, ft: ty::FnTy) { fn enc_bounds(w: io::Writer, cx: @ctxt, bs: @~[ty::param_bound]) { for vec::each(*bs) |bound| { - match bound { + match *bound { ty::bound_send => w.write_char('S'), ty::bound_copy => w.write_char('C'), ty::bound_const => w.write_char('K'), |
