Skip to content
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

Provide an example where a macro relies on a external crate #10

Open
dvberkel opened this issue Mar 8, 2016 · 3 comments
Open

Provide an example where a macro relies on a external crate #10

dvberkel opened this issue Mar 8, 2016 · 3 comments
Assignees

Comments

@dvberkel
Copy link
Contributor

dvberkel commented Mar 8, 2016

In the Rust Community forum there is a question on how to make a external crate work in a macro.

Unresolved import; can’t find crate/modules in macro no matter what I do

You answered that question. I am having similar issues getting a macro to work. Specifically I would like to use the gen_range method from the rand crate. I am in the processof following your advice, putting together all the pieces to see if I can make it work.

Would it be interesting to include an example of a macro that uses an external crate in the little book of rust macros?

@dvberkel
Copy link
Contributor Author

dvberkel commented Mar 9, 2016

Following your advice I made a macro that uses a external crate. If you are interested I could write up my experience as a pull request.

@DanielKeep
Copy link
Owner

Seems like a good idea for the import/export section. One thing I'm a little leery about, however, is that I've started getting "this will be a hard error in future" warnings on the trick I use to do this... so I'll need to sort out what's going on first.

@DanielKeep DanielKeep self-assigned this Mar 11, 2016
@dvberkel
Copy link
Contributor Author

I would want to pass along work that I am interested in on to you, but I am no expert. If there is anything I can do to help, just let me know.

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

No branches or pull requests

2 participants