about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-04 13:52:09 +0000
committerbors <bors@rust-lang.org>2014-10-04 13:52:09 +0000
commit20f4c45bade89f0a8df5297811af3d9f8b91d075 (patch)
tree82d601268e6a4b5bacaaa88eb8bcbae1471e3b8f /src/libsyntax
parent749ff5e76a0d08837964e44c66654679a3a88bb8 (diff)
parent2d93a0406b80fbe91f75b66708e811c165a4cd32 (diff)
downloadrust-20f4c45bade89f0a8df5297811af3d9f8b91d075.tar.gz
rust-20f4c45bade89f0a8df5297811af3d9f8b91d075.zip
auto merge of #17769 : dotdash/rust/snapshot, r=eddyb
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/codemap.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index cd215c1d68c..dda41070431 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -291,10 +291,8 @@ impl FileMap {
 
     /// get a line from the list of pre-computed line-beginnings
     ///
-    /// NOTE(stage0, pcwalton): Remove `#[allow(unused_mut)]` after snapshot.
-    #[allow(unused_mut)]
     pub fn get_line(&self, line: int) -> String {
-        let mut lines = self.lines.borrow_mut();
+        let lines = self.lines.borrow();
         let begin: BytePos = *lines.get(line as uint) - self.start_pos;
         let begin = begin.to_uint();
         let slice = self.src.as_slice().slice_from(begin);
@@ -515,8 +513,6 @@ impl CodeMap {
         return a;
     }
 
-    // NOTE(stage0, pcwalton): Remove `#[allow(unused_mut)]` after snapshot.
-    #[allow(unused_mut)]
     fn lookup_line(&self, pos: BytePos) -> FileMapAndLine {
         let idx = self.lookup_filemap_idx(pos);
 
@@ -524,7 +520,7 @@ impl CodeMap {
         let f = files.get(idx).clone();
         let mut a = 0u;
         {
-            let mut lines = f.lines.borrow_mut();
+            let lines = f.lines.borrow();
             let mut b = lines.len();
             while b - a > 1u {
                 let m = (a + b) / 2u;