Code
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?
Repro: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=78af4a05d6f14cb870fd0bddbe058dbd
Inspired by #t-lang > 7-bit escapes.
cc rust-lang/rfcs#3349
Code
Current output
Desired output
Rationale and extra context
No response
Other cases
Rust Version
Anything else?
Repro: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=78af4a05d6f14cb870fd0bddbe058dbd
Inspired by #t-lang > 7-bit escapes.
cc rust-lang/rfcs#3349