Skip to content

Commit c6cb014

Browse files
committed
Clarify error message wording
1 parent a9bb3fb commit c6cb014

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_parse/src/lexer

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/lexer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl<'a> StringReader<'a> {
269269
// as there will be less overall work to do this way.
270270
let token = unicode_chars::check_for_substitution(self, start, c, &mut err);
271271
if c == '\x00' {
272-
err.help("source files must be encoded in UTF-8, unexpected null bytes might occur when the wrong text encoding is used");
272+
err.help("source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used");
273273
}
274274
err.emit();
275275
token?

0 commit comments

Comments
 (0)