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. :)
I recently released
doc-comment0.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: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 likeinclude_str!without requiring the usage of anonymous constants.I can make the implementation if the rust teams agree to add this feature. :)