Unhelpful Error Messages When Trying to Compile UTF16 Files #73979
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Saving a Hello World program as UTF-16:
and trying to compile it causes about as many errors as there are characters in the file complaining of
unknown start of token: \u{0}
. Instead, using some heuristics to determine that the file is saved as UTF16 and printing a more helpful error message would be much friendlier to new users who are most likely to run into this issue.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: