Skip to content

Commit

Permalink
Revert "Detect NulInCStr error earlier."
Browse files Browse the repository at this point in the history
This reverts commit 6001c50.
  • Loading branch information
lnicola committed Jan 21, 2024
1 parent ef6e6df commit 0ea0565
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion crates/parser/src/lexed_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ fn error_to_diagnostic_message(error: EscapeError, mode: Mode) -> &'static str {
"non-ASCII character in byte string literal"
}
EscapeError::NonAsciiCharInByte => "non-ASCII character in raw byte string literal",
EscapeError::NulInCStr => "null character in C string literal",
EscapeError::UnskippedWhitespaceWarning => "",
EscapeError::MultipleSkippedLinesWarning => "",
}
Expand Down
3 changes: 0 additions & 3 deletions crates/syntax/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ 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",

Expand Down

0 comments on commit 0ea0565

Please sign in to comment.