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

Importing macros: maybe mention magic-compiler-internal std macros? #154

Closed
LukasKalbertodt opened this issue Mar 31, 2019 · 4 comments
Closed

Comments

@LukasKalbertodt
Copy link
Member

I was a bit confused by the chapter about macro imports. See this StackOverflow question. In short: there are some macros in std that cannot be imported via use. Maybe this should be mentioned? Right now it sounds like I can import all macros from extern crates via use.

And/or: maybe this is a bug and it should be possible to import the macros via use, too?

@steveklabnik
Copy link
Member

steveklabnik commented Mar 31, 2019 via email

@LukasKalbertodt
Copy link
Member Author

@steveklabnik Might very well be! @shepmaster found this thread where it's briefly mentioned.

@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.

I have been working on name resolution documentation for the reference, and hopefully the use chapter will get updated with all sorts of goodness. And I believe since this has been written, many macros have become less magic and more "normal".

@ehuss
Copy link
Contributor

ehuss commented Jun 30, 2021

I believe this is now resolved via rust-lang/rust#62086 (built-in macros can now be imported).

@ehuss ehuss closed this as completed Jun 30, 2021
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

3 participants