about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-01-25 01:07:05 -0800
committerKevin Cantu <me@kevincantu.org>2012-01-25 01:07:05 -0800
commiteaa4befd6df4a26be0776d6aab0a7925232d76a7 (patch)
treea00d35c1017fe23c2bb71a8f5ca4bc29c2dd6a21 /src/comp
parent64ce563c054573bd12425e3253b54c1ee91ec84f (diff)
downloadrust-eaa4befd6df4a26be0776d6aab0a7925232d76a7.tar.gz
rust-eaa4befd6df4a26be0776d6aab0a7925232d76a7.zip
Replacing str::unsafe_from_bytes with str::from_bytes (part 3)
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs2
-rw-r--r--src/comp/util/ppaux.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 8de5d7257e2..e0dddd7057b 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -274,7 +274,7 @@ fn sanitize(s: str) -> str {
                            c != ' ' as u8 && c != '\t' as u8 && c != ';' as u8
                        {
                         let v = [c];
-                        result += str::unsafe_from_bytes(v);
+                        result += str::from_bytes(v);
                     }
                 }
             }
diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs
index 11ccd1cc71f..37e5a5f5101 100644
--- a/src/comp/util/ppaux.rs
+++ b/src/comp/util/ppaux.rs
@@ -122,7 +122,7 @@ fn ty_to_str(cx: ctxt, typ: t) -> str {
       }
       ty_var(v) { "<T" + int::str(v) + ">" }
       ty_param(id, _) {
-        "'" + str::unsafe_from_bytes([('a' as u8) + (id as u8)])
+        "'" + str::from_bytes([('a' as u8) + (id as u8)])
       }
       _ { ty_to_short_str(cx, typ) }
     }