]> git.lizzy.rs Git - rust.git/commitdiff
codemap: be less annoying in debug logging
authorCorey Richardson <corey@octayn.net>
Mon, 23 Jun 2014 20:37:30 +0000 (13:37 -0700)
committerCorey Richardson <corey@octayn.net>
Wed, 9 Jul 2014 07:06:29 +0000 (00:06 -0700)
src/libsyntax/codemap.rs

index 2f1e01b239d4c1a6cf4c89ace92d0321980f6bcc..5345776029471a77212ab1de23f873aef715d30b 100644 (file)
@@ -430,7 +430,6 @@ pub fn lookup_byte_offset(&self, bpos: BytePos) -> FileMapAndBytePos {
 
     /// Converts an absolute BytePos to a CharPos relative to the filemap and above.
     pub fn bytepos_to_file_charpos(&self, bpos: BytePos) -> CharPos {
-        debug!("codemap: converting {:?} to char pos", bpos);
         let idx = self.lookup_filemap_idx(bpos);
         let files = self.files.borrow();
         let map = files.get(idx);
@@ -439,7 +438,7 @@ pub fn bytepos_to_file_charpos(&self, bpos: BytePos) -> CharPos {
         let mut total_extra_bytes = 0;
 
         for mbc in map.multibyte_chars.borrow().iter() {
-            debug!("codemap: {:?}-byte char at {:?}", mbc.bytes, mbc.pos);
+            debug!("{}-byte char at {}", mbc.bytes, mbc.pos);
             if mbc.pos < bpos {
                 // every character is at least one byte, so we only
                 // count the actual extra bytes.
@@ -514,11 +513,11 @@ fn lookup_pos(&self, pos: BytePos) -> Loc {
         let chpos = self.bytepos_to_file_charpos(pos);
         let linebpos = *f.lines.borrow().get(a);
         let linechpos = self.bytepos_to_file_charpos(linebpos);
-        debug!("codemap: byte pos {:?} is on the line at byte pos {:?}",
+        debug!("byte pos {} is on the line at byte pos {}",
                pos, linebpos);
-        debug!("codemap: char pos {:?} is on the line at char pos {:?}",
+        debug!("char pos {} is on the line at char pos {}",
                chpos, linechpos);
-        debug!("codemap: byte is on line: {:?}", line);
+        debug!("byte is on line: {}", line);
         assert!(chpos >= linechpos);
         Loc {
             file: f,