Skip to content

Commit 5f970e6

Browse files
committed
codemap: be less annoying in debug logging
1 parent ae9a92b commit 5f970e6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/libsyntax/codemap.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ impl CodeMap {
430430

431431
/// Converts an absolute BytePos to a CharPos relative to the filemap and above.
432432
pub fn bytepos_to_file_charpos(&self, bpos: BytePos) -> CharPos {
433-
debug!("codemap: converting {:?} to char pos", bpos);
434433
let idx = self.lookup_filemap_idx(bpos);
435434
let files = self.files.borrow();
436435
let map = files.get(idx);
@@ -439,7 +438,7 @@ impl CodeMap {
439438
let mut total_extra_bytes = 0;
440439

441440
for mbc in map.multibyte_chars.borrow().iter() {
442-
debug!("codemap: {:?}-byte char at {:?}", mbc.bytes, mbc.pos);
441+
debug!("{}-byte char at {}", mbc.bytes, mbc.pos);
443442
if mbc.pos < bpos {
444443
// every character is at least one byte, so we only
445444
// count the actual extra bytes.
@@ -514,11 +513,11 @@ impl CodeMap {
514513
let chpos = self.bytepos_to_file_charpos(pos);
515514
let linebpos = *f.lines.borrow().get(a);
516515
let linechpos = self.bytepos_to_file_charpos(linebpos);
517-
debug!("codemap: byte pos {:?} is on the line at byte pos {:?}",
516+
debug!("byte pos {} is on the line at byte pos {}",
518517
pos, linebpos);
519-
debug!("codemap: char pos {:?} is on the line at char pos {:?}",
518+
debug!("char pos {} is on the line at char pos {}",
520519
chpos, linechpos);
521-
debug!("codemap: byte is on line: {:?}", line);
520+
debug!("byte is on line: {}", line);
522521
assert!(chpos >= linechpos);
523522
Loc {
524523
file: f,

0 commit comments

Comments
 (0)