You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code like b'→' that puts a unicode character in a byte literal gets a confusing error message:
<anon>:2:7: 2:8 error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte: \u{2192}
<anon>:2 b'→'
^
A lot of people read this as if the part after the colon is in reference to "use a \xHH escape", so it should show an example of that, but it really is just displaying the char that is in error, though somewhat obfuscated by using the codepoint instead of the actual char.
The text was updated successfully, but these errors were encountered:
Current code leads to messages like "... use a \xHH escape: \u{e4}"
which is confusing.
The printed span already points to the offending character, which
should be enough to identify the non-ASCII problem.
Fixes: rust-lang#29088
lexer: do not display char confusingly in error message
Current code leads to messages like `... use a \xHH escape: \u{e4}` which is confusing.
The printed span already points to the offending character, which should be enough to identify the non-ASCII problem.
Fixes: rust-lang#29088
lexer: do not display char confusingly in error message
Current code leads to messages like `... use a \xHH escape: \u{e4}` which is confusing.
The printed span already points to the offending character, which should be enough to identify the non-ASCII problem.
Fixes: rust-lang#29088
Playpen: http://is.gd/DB2ZBU
Code like
b'→'
that puts a unicode character in a byte literal gets a confusing error message:A lot of people read this as if the part after the colon is in reference to "use a \xHH escape", so it should show an example of that, but it really is just displaying the char that is in error, though somewhat obfuscated by using the codepoint instead of the actual char.
The text was updated successfully, but these errors were encountered: