Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #131466 - matthiaskrgr:rollup-3qtz83x, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #123951 (Reserve guarded string literals (RFC 3593)) - #130827 (Library: Rename "object safe" to "dyn compatible") - #131383 (Add docs about slicing slices at the ends) - #131403 (Fix needless_lifetimes in rustc_serialize) - #131417 (Fix methods alignment on mobile) - #131449 (Decouple WASIp2 sockets from WasiFd) - #131462 (Mention allocation errors for `open_buffered`) r? `@ghost` `@rustbot` modify labels: rollup
bors 2024-10-10
parent 6e4b1ef · parent e169449 · commit c07f824
-rw-r--r--crates/parser/src/lexed_str.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/parser/src/lexed_str.rs b/crates/parser/src/lexed_str.rs
index dceac815e0..7ea23b4f75 100644
--- a/crates/parser/src/lexed_str.rs
+++ b/crates/parser/src/lexed_str.rs
@@ -187,6 +187,12 @@ impl<'a> Converter<'a> {
}
rustc_lexer::TokenKind::RawIdent => IDENT,
+
+ rustc_lexer::TokenKind::GuardedStrPrefix => {
+ err = "Invalid string literal (reserved syntax)";
+ ERROR
+ },
+
rustc_lexer::TokenKind::Literal { kind, .. } => {
self.extend_literal(token_text.len(), kind);
return;