about summary refs log tree commit diff
path: root/src/libsyntax/diagnostic.rs
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2014-05-22 16:57:53 -0700
committerRicho Healey <richo@psych0tik.net>2014-05-24 21:48:10 -0700
commit553074506ecd139eb961fb91eb33ad9fd0183acb (patch)
tree01682cf8147183250713acf5e8a77265aab7153c /src/libsyntax/diagnostic.rs
parentbbb70cdd9cd982922cf7390459d53bde409699ae (diff)
downloadrust-553074506ecd139eb961fb91eb33ad9fd0183acb.tar.gz
rust-553074506ecd139eb961fb91eb33ad9fd0183acb.zip
core: rename strbuf::StrBuf to string::String
[breaking-change]
Diffstat (limited to 'src/libsyntax/diagnostic.rs')
-rw-r--r--src/libsyntax/diagnostic.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs
index 446a8f93753..c6a25bc6129 100644
--- a/src/libsyntax/diagnostic.rs
+++ b/src/libsyntax/diagnostic.rs
@@ -17,7 +17,7 @@ use std::cell::{RefCell, Cell};
 use std::fmt;
 use std::io;
 use std::iter::range;
-use std::strbuf::StrBuf;
+use std::string::String;
 use term;
 
 // maximum number of lines we will print for each error; arbitrary.
@@ -405,7 +405,7 @@ fn highlight_lines(err: &mut EmitterWriter,
 
         // indent past |name:## | and the 0-offset column location
         let left = fm.name.len() + digits + lo.col.to_uint() + 3u;
-        let mut s = StrBuf::new();
+        let mut s = String::new();
         // Skip is the number of characters we need to skip because they are
         // part of the 'filename:line ' part of the previous line.
         let skip = fm.name.len() + digits + 3u;
@@ -425,7 +425,7 @@ fn highlight_lines(err: &mut EmitterWriter,
             };
         }
         try!(write!(&mut err.dst, "{}", s));
-        let mut s = StrBuf::from_str("^");
+        let mut s = String::from_str("^");
         let hi = cm.lookup_char_pos(sp.hi);
         if hi.col != lo.col {
             // the ^ already takes up one space
@@ -473,7 +473,7 @@ fn custom_highlight_lines(w: &mut EmitterWriter,
     let hi = cm.lookup_char_pos(sp.hi);
     // Span seems to use half-opened interval, so subtract 1
     let skip = last_line_start.len() + hi.col.to_uint() - 1;
-    let mut s = StrBuf::new();
+    let mut s = String::new();
     for _ in range(0, skip) {
         s.push_char(' ');
     }
@@ -508,7 +508,7 @@ fn print_macro_backtrace(w: &mut EmitterWriter,
     Ok(())
 }
 
-pub fn expect<T:Clone>(diag: &SpanHandler, opt: Option<T>, msg: || -> StrBuf)
+pub fn expect<T:Clone>(diag: &SpanHandler, opt: Option<T>, msg: || -> String)
               -> T {
     match opt {
        Some(ref t) => (*t).clone(),