about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-11 17:02:13 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-12 12:08:26 -0700
commita9ce342fa384b3c1f86e9b3a80ec7b30a87d2e65 (patch)
tree94e3672f0e08e1a56cc4ce44d803f85bf38c892b /src/comp
parent49b80f9bf7a3d72a58111b9d753a777411c7ad4a (diff)
downloadrust-a9ce342fa384b3c1f86e9b3a80ec7b30a87d2e65.tar.gz
rust-a9ce342fa384b3c1f86e9b3a80ec7b30a87d2e65.zip
Convert all uses of unsafe_from_bytes to unsafe_from_bytes_ivec
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs4
-rw-r--r--src/comp/syntax/parse/lexer.rs6
-rw-r--r--src/comp/syntax/print/pprust.rs4
-rw-r--r--src/comp/util/ppaux.rs2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 36d496111a8..ede46df6df5 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -311,8 +311,8 @@ fn sanitize(s: &str) -> str {
                     if c != 10u8 && c != '}' as u8 && c != ')' as u8 &&
                            c != ' ' as u8 && c != '\t' as u8 && c != ';' as u8
                        {
-                        let v = [c];
-                        result += str::unsafe_from_bytes(v);
+                        let v = ~[c];
+                        result += str::unsafe_from_bytes_ivec(v);
                     }
                 }
             }
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index b101f274858..04939ad0ecd 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -177,11 +177,11 @@ fn scan_exponent(rdr: &reader) -> option::t[str] {
     let c = rdr.curr();
     let rslt = "";
     if c == 'e' || c == 'E' {
-        rslt += str::unsafe_from_bytes([c as u8]);
+        rslt += str::unsafe_from_bytes_ivec(~[c as u8]);
         rdr.bump();
         c = rdr.curr();
         if c == '-' || c == '+' {
-            rslt += str::unsafe_from_bytes([c as u8]);
+            rslt += str::unsafe_from_bytes_ivec(~[c as u8]);
             rdr.bump();
         }
         let exponent = scan_dec_digits(rdr);
@@ -195,7 +195,7 @@ fn scan_dec_digits(rdr: &reader) -> str {
     let c = rdr.curr();
     let rslt: str = "";
     while is_dec_digit(c) || c == '_' {
-        if c != '_' { rslt += str::unsafe_from_bytes([c as u8]); }
+        if c != '_' { rslt += str::unsafe_from_bytes_ivec(~[c as u8]); }
         rdr.bump();
         c = rdr.curr();
     }
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index 0730c98d6c2..6d89bc325de 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -1385,8 +1385,8 @@ fn print_literal(s: &ps, lit: &@ast::lit) {
         print_string(s, st);
       }
       ast::lit_char(ch) {
-        word(s.s, "'" +
-             escape_str(str::unsafe_from_bytes([ch as u8]), '\'') + "'");
+        word(s.s, "'" + escape_str(
+            str::unsafe_from_bytes_ivec(~[ch as u8]), '\'') + "'");
       }
       ast::lit_int(val) { word(s.s, int::str(val)); }
       ast::lit_uint(val) { word(s.s, uint::str(val) + "u"); }
diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs
index 2bdb8742478..a598237284b 100644
--- a/src/comp/util/ppaux.rs
+++ b/src/comp/util/ppaux.rs
@@ -132,7 +132,7 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
       }
       ty_var(v) { s += "<T" + int::str(v) + ">"; }
       ty_param(id,_) {
-        s += "'" + str::unsafe_from_bytes([('a' as u8) + (id as u8)]);
+        s += "'" + str::unsafe_from_bytes_ivec(~[('a' as u8) + (id as u8)]);
       }
       _ { s += ty_to_short_str(cx, typ); }
     }