-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Description
I recently released doc-comment
0.4 which converted declarative macros to proc-macros. I encountered a "funny" issue though: I needed the compiler to track files that were included using my proc-macros. In order to do so, I generated anonymous constants which looked like this:
const _: &'static str = include_str!("file.md");
However, I have no use for those constants and they make the source code heavier for just keeping track of a file. Therefore, I propose to add a track!("file")
macro which would allow to track files like include_str!
without requiring the usage of anonymous constants.
I can make the implementation if the rust teams agree to add this feature. :)
drahnr, jgarvin, zetanumbers, tjkirch, SeaDve and 1 morecyqsimonfinnbear
Metadata
Metadata
Assignees
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team