format!
error messages point to wrong characters when using macro-generated literals
#84651
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen:
Instead, this happened:
Another more complicated example, is using
include_str!
(with a self-include to make playground testing easier):Similar to #81070 it'd be very nice if this was able to point to the location in the included file, but if it can't it should probably have a simpler error message like "in external string included here".
Meta
Tested on stable 1.51.0 and
1.53.0-nightly (2021-04-27 727d101561f9b1e81c62)
The text was updated successfully, but these errors were encountered: