Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Export proc-macros directly from main crate #71

Closed
TedDriggs opened this issue Nov 22, 2017 · 3 comments
Closed

Export proc-macros directly from main crate #71

TedDriggs opened this issue Nov 22, 2017 · 3 comments

Comments

@TedDriggs
Copy link

There's a trick that can export traits and proc macros from one crate. Using this would make the dependency declaration cleaner, and could be gated on a default feature for people who don't need the macros.

@withoutboats
Copy link
Contributor

Can you link to the trick?

@TedDriggs
Copy link
Author

TedDriggs commented Nov 27, 2017

Here is @dtolnay's awesome writeup on it.

You can see it in action here in one of my own projects.

I believe the trick is that you can reexport proc macros, you just can't declare them locally.

@withoutboats
Copy link
Contributor

Interesting! This is technically an unstable feature we accidentally allowed through on stable. I'll think about doing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants