We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64ce563 commit eaa4befCopy full SHA for eaa4bef
src/comp/middle/trans.rs
@@ -274,7 +274,7 @@ fn sanitize(s: str) -> str {
274
c != ' ' as u8 && c != '\t' as u8 && c != ';' as u8
275
{
276
let v = [c];
277
- result += str::unsafe_from_bytes(v);
+ result += str::from_bytes(v);
278
}
279
280
src/comp/util/ppaux.rs
@@ -122,7 +122,7 @@ fn ty_to_str(cx: ctxt, typ: t) -> str {
122
123
ty_var(v) { "<T" + int::str(v) + ">" }
124
ty_param(id, _) {
125
- "'" + str::unsafe_from_bytes([('a' as u8) + (id as u8)])
+ "'" + str::from_bytes([('a' as u8) + (id as u8)])
126
127
_ { ty_to_short_str(cx, typ) }
128
0 commit comments