diff options
| author | Marijn Haverbeke <[email protected]> | 2011-05-12 17:24:54 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-05-12 21:30:44 +0200 |
| commit | 3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2 (patch) | |
| tree | 508982ed2f789aedd89eebd529343d9dc88b8e01 /src/comp/front/codemap.rs | |
| parent | Transitional change to make extfmt output lowercase module name (diff) | |
| download | rust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.tar.xz rust-3816e57fd2a8ab19e4ac6d4b3ddd5b49d5973ff2.zip | |
Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
Diffstat (limited to 'src/comp/front/codemap.rs')
| -rw-r--r-- | src/comp/front/codemap.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/front/codemap.rs b/src/comp/front/codemap.rs index 578f574b..c474fa07 100644 --- a/src/comp/front/codemap.rs +++ b/src/comp/front/codemap.rs @@ -1,4 +1,4 @@ -import std.Vec; +import std::_vec; /* A codemap is a thing that maps uints to file/line/column positions * in a crate. This to make it possible to represent the positions @@ -24,18 +24,18 @@ fn new_filemap(str filename, uint start_pos) -> filemap { } fn next_line(filemap file, uint pos) { - Vec.push[uint](file.lines, pos); + _vec::push[uint](file.lines, pos); } fn lookup_pos(codemap map, uint pos) -> loc { - auto a = 0u; auto b = Vec.len[filemap](map.files); + auto a = 0u; auto b = _vec::len[filemap](map.files); while (b - a > 1u) { auto m = (a + b) / 2u; if (map.files.(m).start_pos > pos) { b = m; } else { a = m; } } auto f = map.files.(a); - a = 0u; b = Vec.len[uint](f.lines); + a = 0u; b = _vec::len[uint](f.lines); while (b - a > 1u) { auto m = (a + b) / 2u; if (f.lines.(m) > pos) { b = m; } |