-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-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
env!{"\t"}
Current output
error: environment variable ` ` not defined at compile time
--> env.rs:1:1
|
1 | env!{"\t"}
| ^^^^^^^^^^
|
= help: use `std::env::var(" ")` to read the variable at run time
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
Desired output
This error: environment variable ` ` not defined at compile time
looks very weird imo because it looks like its something misssing there. I think actually rustc is quoting the `\t` here but while it is escaped in the code, it is not escaped in the error message.
Might be nice to print something like
..` `(`\t`) not defined.. ?
Rationale and extra context
No response
Other cases
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-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.