about summary refs log tree commit diff
path: root/src/libsyntax/codemap.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-27 21:01:58 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-30 23:21:19 -0700
commitaf3b132285bc9314d545cae2e4eaef079a26252a (patch)
tree1c7116cb4d82388a6eb3da6e4088448ea24016ba /src/libsyntax/codemap.rs
parent7e709bfd0dac1d5bbe5c97494980731b4d477e8f (diff)
downloadrust-af3b132285bc9314d545cae2e4eaef079a26252a.tar.gz
rust-af3b132285bc9314d545cae2e4eaef079a26252a.zip
syntax: Remove usage of fmt!
Diffstat (limited to 'src/libsyntax/codemap.rs')
-rw-r--r--src/libsyntax/codemap.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index c8e40b82e0c..de8f45c880d 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -290,7 +290,7 @@ impl CodeMap {
 
     pub fn mk_substr_filename(&self, sp: Span) -> ~str {
         let pos = self.lookup_char_pos(sp.lo);
-        return fmt!("<%s:%u:%u>", pos.file.name,
+        return format!("<{}:{}:{}>", pos.file.name,
                     pos.line, pos.col.to_uint());
     }
 
@@ -336,7 +336,7 @@ impl CodeMap {
 
         let lo = self.lookup_char_pos_adj(sp.lo);
         let hi = self.lookup_char_pos_adj(sp.hi);
-        return fmt!("%s:%u:%u: %u:%u", lo.filename,
+        return format!("{}:{}:{}: {}:{}", lo.filename,
                     lo.line, lo.col.to_uint(), hi.line, hi.col.to_uint())
     }
 
@@ -374,7 +374,7 @@ impl CodeMap {
         for fm in self.files.iter() { if filename == fm.name { return *fm; } }
         //XXjdm the following triggers a mismatched type bug
         //      (or expected function, found _|_)
-        fail!(); // ("asking for " + filename + " which we don't know about");
+        fail2!(); // ("asking for " + filename + " which we don't know about");
     }
 }
 
@@ -393,7 +393,7 @@ impl CodeMap {
             }
         }
         if (a >= len) {
-            fail!("position %u does not resolve to a source location", pos.to_uint())
+            fail2!("position {} does not resolve to a source location", pos.to_uint())
         }
 
         return a;
@@ -419,11 +419,11 @@ impl CodeMap {
         let chpos = self.bytepos_to_local_charpos(pos);
         let linebpos = f.lines[a];
         let linechpos = self.bytepos_to_local_charpos(linebpos);
-        debug!("codemap: byte pos %? is on the line at byte pos %?",
+        debug2!("codemap: byte pos {:?} is on the line at byte pos {:?}",
                pos, linebpos);
-        debug!("codemap: char pos %? is on the line at char pos %?",
+        debug2!("codemap: char pos {:?} is on the line at char pos {:?}",
                chpos, linechpos);
-        debug!("codemap: byte is on line: %?", line);
+        debug2!("codemap: byte is on line: {:?}", line);
         assert!(chpos >= linechpos);
         return Loc {
             file: f,
@@ -435,7 +435,7 @@ impl CodeMap {
     fn span_to_str_no_adj(&self, sp: Span) -> ~str {
         let lo = self.lookup_char_pos(sp.lo);
         let hi = self.lookup_char_pos(sp.hi);
-        return fmt!("%s:%u:%u: %u:%u", lo.file.name,
+        return format!("{}:{}:{}: {}:{}", lo.file.name,
                     lo.line, lo.col.to_uint(), hi.line, hi.col.to_uint())
     }
 
@@ -450,7 +450,7 @@ impl CodeMap {
     // Converts an absolute BytePos to a CharPos relative to the file it is
     // located in
     fn bytepos_to_local_charpos(&self, bpos: BytePos) -> CharPos {
-        debug!("codemap: converting %? to char pos", bpos);
+        debug2!("codemap: converting {:?} to char pos", bpos);
         let idx = self.lookup_filemap_idx(bpos);
         let map = self.files[idx];
 
@@ -458,7 +458,7 @@ impl CodeMap {
         let mut total_extra_bytes = 0;
 
         for mbc in map.multibyte_chars.iter() {
-            debug!("codemap: %?-byte char at %?", mbc.bytes, mbc.pos);
+            debug2!("codemap: {:?}-byte char at {:?}", mbc.bytes, mbc.pos);
             if mbc.pos < bpos {
                 total_extra_bytes += mbc.bytes;
                 // We should never see a byte position in the middle of a