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

Update proc-macro note in extern-prelude section #789

Closed
XAMPPRocky opened this issue Apr 7, 2020 · 3 comments · Fixed by #815
Closed

Update proc-macro note in extern-prelude section #789

XAMPPRocky opened this issue Apr 7, 2020 · 3 comments · Fixed by #815
Labels
Easy We believe this would not be difficult to actually fix

Comments

@XAMPPRocky
Copy link
Member

The procedural macro examples use extern crate proc_macro; which as of 1.42.0 is no longer required. https://doc.rust-lang.org/reference/procedural-macros.html

@Centril
Copy link
Contributor

Centril commented Apr 7, 2020

extern crate is still required by the language itself as it doesn't put the crate into the extern prelude. What has changed is that Cargo now puts the crate into the extern prelude, but that's not part of the language.

@XAMPPRocky
Copy link
Member Author

TIL, it's a bit annoying since the reference is the first result people find when searching, but not the worst so I guess we can close.

@ehuss
Copy link
Contributor

ehuss commented Apr 7, 2020

Yea, I don't really care one way or the other for the examples.

Ideally we could use better user-level documentation for proc-macros (maybe a dedicated book!). TRPL could mention it, though I'm not sure it is super important.

The note on https://doc.rust-lang.org/reference/items/extern-crates.html#extern-prelude needs to be updated, though. It's been on my todo list for a while. I really should file issues instead of jotting notes.

@ehuss ehuss reopened this Apr 7, 2020
@ehuss ehuss added the Easy We believe this would not be difficult to actually fix label Apr 16, 2020
@ehuss ehuss changed the title Remove old extern crate proc_macro in examples Update proc-macro note in extern-prelude section Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy We believe this would not be difficult to actually fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants