-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow renaming imported macros #22290
Comments
I'd say |
Traige: no change |
I have an actual use-case for this now :) I'm trying to write some benchmarks comparing maud, horrorshow and a new alternative I'm working on, every one of these defines an
I did think I would be able to work around it by pulling the crates into internal modules and just exposing functions for the benchmarks to call into, but that fails as for some reason you can only import macros in at the crate root (seems like an arbitrary restriction, if you can define private macros in a sub-module why can't you import private macros that are only needed in a sub-module to prevent polluting your global macro namespace). The only workaround I've found is to group my benchmarks by implementing crate instead of grouping them by what they are doing, this makes changing the benchmarks more error-prone as I have to make almost identical changes to 3 different files without being able to easily see them all at once to check they're still doing the same thing. |
I can implement that if there is consensus on it. Shouldn't be too hard. |
Question: what to do when using both Let's say you have a renaming item |
I'm also annoyed by this. Is this an intentional restriction? |
I don't think so. Not super easy to change though, given the current implementation. |
Would also be nice to be able to only import certain macros. |
I believe this should be fixed by the |
I'm going to close this in favor of the tracking issue for |
e.g.
Now which way around does it go...
The text was updated successfully, but these errors were encountered: