fix: allow include_dir! to be called from within another macro#115
Open
dnbln wants to merge 1 commit intoMichael-F-Bryan:masterfrom
Open
fix: allow include_dir! to be called from within another macro#115dnbln wants to merge 1 commit intoMichael-F-Bryan:masterfrom
dnbln wants to merge 1 commit intoMichael-F-Bryan:masterfrom
Conversation
Author
|
Hi @Michael-F-Bryan, could you let me know if you intend to support calling include_dir from another macro? Because right now the only way to work around that is to have a whole other proc macro crate just to unwrap the string literal from the group before giving it to include_dir, so that include_dir can get an ungrouped string literal, which is not great |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, invoking
include_dir!from within another macro using a$...:literalmatcher argument, include_dir! rejected it because it is wrapped in aTokenTree::GroupwithDelimiter::Nonedelimiter. This patch allowsinclude_dir!to be used from other macros.I've also added a test for it.