diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs index bb63dbd5303..4bf870eb7ce 100644 --- a/compiler/rustc_parse/src/lexer/mod.rs +++ b/compiler/rustc_parse/src/lexer/mod.rs @@ -269,7 +269,7 @@ impl<'a> StringReader<'a> { // as there will be less overall work to do this way. let token = unicode_chars::check_for_substitution(self, start, c, &mut err); if c == '\x00' { - err.help("source files must be encoded in UTF-8, unexpected null bytes might occur when the wrong text encoding is used"); + err.help("source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used"); } err.emit(); token?