Raw strings w/ too many terminating hashes are not exclusively handled #140618
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
rustc
is already capable of warning the user if a raw string is found to be finalized with one more octothorpe (#
) than expected. To avoid confusion, the compiler reserves multi-hash tokens, ensuring that###
and#"foo"#
are not interpreted as three separate tokens in macro invocations (see here). However, in my opinion, raw strings whose terminators are followed by one or more '#' characters may not create an edge case. They must already be recognized by the compiler as a "malformed token."Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: