diff options
| author | Marijn Haverbeke <[email protected]> | 2011-05-06 22:13:13 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-05-06 22:51:19 +0200 |
| commit | a3ec0b1f643d00b9418e4884bd7caa07bf052201 (patch) | |
| tree | 82000510ac9c9cf3f0c7cf4ae5f3c6b123b559cb /src/comp/middle/capture.rs | |
| parent | Register new snapshots. (diff) | |
| download | rust-a3ec0b1f643d00b9418e4884bd7caa07bf052201.tar.xz rust-a3ec0b1f643d00b9418e4884bd7caa07bf052201.zip | |
Rename std modules to be camelcased
(Have fun mergining your stuff with this.)
Diffstat (limited to 'src/comp/middle/capture.rs')
| -rw-r--r-- | src/comp/middle/capture.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/comp/middle/capture.rs b/src/comp/middle/capture.rs index 02431580..003c3897 100644 --- a/src/comp/middle/capture.rs +++ b/src/comp/middle/capture.rs @@ -1,29 +1,29 @@ import driver.session; import front.ast; -import std.map.hashmap; -import std.option; -import std.option.some; -import std.option.none; -import std._int; -import std._vec; +import std.Map.hashmap; +import std.Option; +import std.Option.some; +import std.Option.none; +import std.Int; +import std.Vec; import util.common; -type fn_id_of_local = std.map.hashmap[ast.def_id, ast.def_id]; +type fn_id_of_local = std.Map.hashmap[ast.def_id, ast.def_id]; type env = rec(mutable vec[ast.def_id] current_context, // fn or obj fn_id_of_local idmap, session.session sess); fn current_context(&env e) -> ast.def_id { - ret e.current_context.(_vec.len(e.current_context) - 1u); + ret e.current_context.(Vec.len(e.current_context) - 1u); } fn enter_item(@env e, @ast.item i) { alt (i.node) { case (ast.item_fn(?name, _, _, ?id, _)) { - _vec.push(e.current_context, id); + Vec.push(e.current_context, id); } case (ast.item_obj(_, _, _, ?ids, _)) { - _vec.push(e.current_context, ids.ty); + Vec.push(e.current_context, ids.ty); } case (_) {} } @@ -32,10 +32,10 @@ fn enter_item(@env e, @ast.item i) { fn leave_item(@env e, @ast.item i) { alt (i.node) { case (ast.item_fn(?name, _, _, ?id, _)) { - _vec.pop(e.current_context); + Vec.pop(e.current_context); } case (ast.item_obj(_, _, _, ?ids, _)) { - _vec.pop(e.current_context); + Vec.pop(e.current_context); } case (_) {} } @@ -61,13 +61,13 @@ fn walk_expr(@env e, @ast.expr x) { } case (ast.expr_path(_, ?def, _)) { auto local_id; - alt (option.get(def)) { + alt (Option.get(def)) { case (ast.def_local(?id)) { local_id = id; } case (_) { ret; } } - auto df = ast.def_id_of_def(option.get(def)); - auto def_context = option.get(e.idmap.find(df)); + auto df = ast.def_id_of_def(Option.get(def)); + auto def_context = Option.get(e.idmap.find(df)); if (current_context(*e) != def_context) { e.sess.span_err(x.span, |