Reserve guarded string literals (RFC 3593)

This commit is contained in:
Peter Jaszkowiak 2024-04-14 17:37:45 -06:00
parent c54c798a08
commit ec11c27e5c

View file

@ -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;