Reapply "Detect NulInCStr error earlier."

This reverts commit 0ea056552a.
This commit is contained in:
Laurențiu Nicola 2024-01-25 06:40:07 +02:00
parent 0d52934d19
commit b1b6e0c41a
2 changed files with 4 additions and 0 deletions

View file

@ -106,6 +106,9 @@ fn rustc_unescape_error_to_string(err: unescape::EscapeError) -> (&'static str,
EE::NonAsciiCharInByte => {
"Byte literals must not contain non-ASCII characters"
}
EE::NulInCStr => {
"C strings literals must not contain null characters"
}
EE::UnskippedWhitespaceWarning => "Whitespace after this escape is not skipped",
EE::MultipleSkippedLinesWarning => "Multiple lines are skipped by this escape",