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

Explain why macros cannot be imported from the same crate #115

Open
johnthagen opened this issue Oct 22, 2018 · 3 comments
Open

Explain why macros cannot be imported from the same crate #115

johnthagen opened this issue Oct 22, 2018 · 3 comments

Comments

@johnthagen
Copy link
Contributor

I was reading the Macro Changes page:

Note that you'll still need #[macro_use] to use macros you've defined in your own crate; this feature only works for importing macros from external crates.

A couple questions that immediately came to mind:

  • Why? Could a link be added for people to read more about this?
  • Is it planned that in the future you can import macros from your own crate?

I think it would be helpful to add a little background about this, as I'm sure others will have similar questions.

@johnthagen
Copy link
Contributor Author

johnthagen commented Oct 22, 2018

@johnthagen
Copy link
Contributor Author

@ehuss
Copy link
Contributor

ehuss commented May 25, 2021

In #232 this section has moved to https://github.com/rust-lang/edition-guide/blob/302a115e8f71876dfc884aebb0ca5ccb02b8a962/src/rust-2018/path-changes.md#macros.

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