diff options
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/parse/lexer.rs | 6 | ||||
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 4 |
2 files changed, 5 insertions, 5 deletions
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"); } |
