-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Raw identifiers don't work in formatting strings #115466
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected to see this happen: The program compiles and prints "It is foobar" to stdout.
Instead, this happened: The compiler gives an error while compiling: "error: invalid format string"
Meta
rustc --version --verbose:(Only tested on playground, but on all three channels, reported as:)
It's not a compiler crash, so I'm going to leave out the backtrace and instead just show what the compiler outputs when you try to compile the above code:
I'm not convinced this is solvable/possible (I can imagine allowing this could potentially interfere with other formatting options (although they all follow a
:, right? So maybe not.), but I also couldn't find any existing issue about it, so I figured I'd open one to have it clarified.