-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
dbg!('\xFF');Current output
error: out of range hex escape
--> src/main.rs:2:11
|
2 | dbg!('\xFF');
| ^^^^ must be a character in the range [\x00-\x7f]Desired output
error: out of range hex escape
--> src/main.rs:2:11
|
2 | dbg!('\xFF');
| ^^^^ must be a character in the range [\x00-\x7f]
|
| hint: Perhaps you want `b'\xFF'` for a single byte with that value or `'\u{FF}'` for that Unicode character.Rationale and extra context
No response
Other cases
Rust Version
Build using the Nightly version: 1.93.0-nightly
(2025-11-12 01867557cd7dbe256a03)Anything else?
Inspired by #t-lang > 7-bit escapes.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.