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

Support derive on renamed crate imports #75

Open
KodrAus opened this issue May 30, 2017 · 0 comments
Open

Support derive on renamed crate imports #75

KodrAus opened this issue May 30, 2017 · 0 comments

Comments

@KodrAus
Copy link
Member

KodrAus commented May 30, 2017

One of the benefits of wrapping the custom derive in a const is that we can re-import the appropriate elastic_types/elastic crate and give it an alias even if the user has imported it under a different name.

This should be a simple matter of splitting the crate_root parameter into krate and path, so we can:

const _IMPL_BLAH: () = {
    extern crate $krate as _derive;

    impl _derive::$path::DocumentType for Blah { }
};
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

1 participant