about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-02-21 18:27:24 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-02-22 16:09:16 -0800
commita07192fadd794b1eaaec85541886e07578002b74 (patch)
tree24e178f84f1543d1902abd15c7740edba2f78a26 /src/libsyntax
parent934c938f90662522c4a8a86bd58d7618207f5c2a (diff)
downloadrust-a07192fadd794b1eaaec85541886e07578002b74.tar.gz
rust-a07192fadd794b1eaaec85541886e07578002b74.zip
libsyntax: Remove all mutable fields from libsyntax. rs=demuting
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/codemap.rs6
-rw-r--r--src/libsyntax/util/interner.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index 3a863fc7ac5..1ab55fe9035 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -242,7 +242,7 @@ pub struct FileMap {
     /// The start position of this source in the CodeMap
     start_pos: BytePos,
     /// Locations of lines beginnings in the source code
-    mut lines: ~[BytePos],
+    lines: @mut ~[BytePos],
     /// Locations of multi-byte characters in the source code
     multibyte_chars: DVec<MultiByteChar>
 }
@@ -312,7 +312,7 @@ pub impl CodeMap {
         let filemap = @FileMap {
             name: filename, substr: substr, src: src,
             start_pos: BytePos(start_pos),
-            mut lines: ~[],
+            lines: @mut ~[],
             multibyte_chars: DVec()
         };
 
@@ -439,7 +439,7 @@ priv impl CodeMap {
         let idx = self.lookup_filemap_idx(pos);
         let f = self.files[idx];
         let mut a = 0u;
-        let mut b = vec::len(f.lines);
+        let mut b = f.lines.len();
         while b - a > 1u {
             let m = (a + b) / 2u;
             if f.lines[m] > pos { b = m; } else { a = m; }
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs
index 4b13818974c..41500d6a409 100644
--- a/src/libsyntax/util/interner.rs
+++ b/src/libsyntax/util/interner.rs
@@ -18,7 +18,7 @@ use hashmap::linear::LinearMap;
 use dvec::DVec;
 
 pub struct Interner<T> {
-    priv mut map: LinearMap<T, uint>,
+    priv map: @mut LinearMap<T, uint>,
     priv vect: DVec<T>,
 }
 
@@ -26,7 +26,7 @@ pub struct Interner<T> {
 pub impl<T:Eq + IterBytes + Hash + Const + Copy> Interner<T> {
     static fn new() -> Interner<T> {
         Interner {
-            map: LinearMap::new(),
+            map: @mut LinearMap::new(),
             vect: DVec(),
         }
     }