Skip to content

Commit d85ed77

Browse files
committed
Auto merge of #120089 - matthiaskrgr:rollup-xyfqrb5, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #119172 (Detect `NulInCStr` error earlier.) - #119833 (Make tcx optional from StableMIR run macro and extend it to accept closures) - #119967 (Add `PatKind::Err` to AST/HIR) - #119978 (Move async closure parameters into the resultant closure's future eagerly) - #120021 (don't store const var origins for known vars) - #120038 (Don't create a separate "basename" when naming and opening a MIR dump file) - #120057 (Don't ICE when deducing future output if other errors already occurred) - #120073 (Remove spastorino from users_on_vacation) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 44ce579 + 8a9da01 commit d85ed77

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/parser/src/lexed_str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ fn error_to_diagnostic_message(error: EscapeError, mode: Mode) -> &'static str {
369369
"non-ASCII character in byte string literal"
370370
}
371371
EscapeError::NonAsciiCharInByte => "non-ASCII character in raw byte string literal",
372+
EscapeError::NulInCStr => "null character in C string literal",
372373
EscapeError::UnskippedWhitespaceWarning => "",
373374
EscapeError::MultipleSkippedLinesWarning => "",
374375
}

crates/syntax/src/validation.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ fn rustc_unescape_error_to_string(err: unescape::EscapeError) -> (&'static str,
106106
EE::NonAsciiCharInByte => {
107107
"Byte literals must not contain non-ASCII characters"
108108
}
109+
EE::NulInCStr => {
110+
"C strings literals must not contain null characters"
111+
}
109112
EE::UnskippedWhitespaceWarning => "Whitespace after this escape is not skipped",
110113
EE::MultipleSkippedLinesWarning => "Multiple lines are skipped by this escape",
111114

0 commit comments

Comments
 (0)