about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-31 14:38:48 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-31 16:24:08 -0700
commit1772ee3c43656729f096d8902d7cf6f4d9cacc8d (patch)
tree3571dd54879d3ec1107de1322caacdc9e0d7c02c /src/comp
parentdc6f78561c238c472a6bab50eea36f4b3a39671d (diff)
downloadrust-1772ee3c43656729f096d8902d7cf6f4d9cacc8d.tar.gz
rust-1772ee3c43656729f096d8902d7cf6f4d9cacc8d.zip
Remove a few more usages of std::str from rustc. Issue #855
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs1
-rw-r--r--src/comp/middle/trans_common.rs1
-rw-r--r--src/comp/syntax/codemap.rs10
3 files changed, 5 insertions, 7 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 56d3d19553f..c71e04ae747 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -16,7 +16,6 @@ import std::int;
 import std::str;
 import std::istr;
 import std::uint;
-import std::str::rustrt::sbuf;
 import std::map;
 import std::map::hashmap;
 import std::option;
diff --git a/src/comp/middle/trans_common.rs b/src/comp/middle/trans_common.rs
index fc211b1dfaa..98a47b7a386 100644
--- a/src/comp/middle/trans_common.rs
+++ b/src/comp/middle/trans_common.rs
@@ -9,7 +9,6 @@ import std::vec::to_ptr;
 import std::str;
 import std::istr;
 import std::uint;
-import std::str::rustrt::sbuf;
 import std::map;
 import std::map::hashmap;
 import std::option;
diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs
index 508aa1da700..9c9a0049cf1 100644
--- a/src/comp/syntax/codemap.rs
+++ b/src/comp/syntax/codemap.rs
@@ -174,17 +174,17 @@ fn maybe_highlight_lines(sp: &option::t<span>, cm: &codemap,
 
             // indent past |name:## | and the 0-offset column location
             let left = istr::char_len(fm.name) + digits + lo.col + 3u;
-            let s = "";
-            while left > 0u { str::push_char(s, ' '); left -= 1u; }
+            let s = ~"";
+            while left > 0u { istr::push_char(s, ' '); left -= 1u; }
 
-            s += "^";
+            s += ~"^";
             let hi = lookup_char_pos(cm, option::get(sp).hi);
             if hi.col != lo.col {
                 // the ^ already takes up one space
                 let width = hi.col - lo.col - 1u;
-                while width > 0u { str::push_char(s, '~'); width -= 1u; }
+                while width > 0u { istr::push_char(s, '~'); width -= 1u; }
             }
-            io::stdout().write_str(istr::from_estr(s + "\n"));
+            io::stdout().write_str(s + ~"\n");
         }
       }
       _ { }