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 procedural-macros.md adding context for use of `extern crate p… #1504

Closed
wants to merge 2 commits into from

Conversation

mav3ri3k
Copy link

Use of extern crate is generally stopped and not recommended source. Its use here was confusing for me. Based on the config provided here for the Cargo.toml file, use of extern crate proc_macro; in following examples is not required.

The snippets were last updated 6 years ago. I would personally remove use of extern crate crate from following examples and add one with it to show how it can be done when using separate build system which would likely be niche case.

mav3ri3k and others added 2 commits May 29, 2024 14:13
…roc_macro`

Use of `extern crate` is generally stopped and not recommended [source](https://github.com/rust-lang/edition-guide/blob/master/src/rust-2018/path-changes.md#an-exception). Its use here was confusing for me. Based on the config provided here for the `Cargo.toml` file, use of `extern crate proc_macro;` in following examples is not required. 

The snippets were last updated 6 years ago. I would personally remove use of `extern crate` crate from following examples and add one with it to show how it can be done when using separate build system.
@traviscross
Copy link
Contributor

We discussed this in the rustdocs call. We appreciate the PR; thanks @mav3ri3k for proposing it. However, we're going to close it as it goes a bit too far in discussing details of Cargo that aren't really appropriate for the Reference.

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

Successfully merging this pull request may close these issues.

2 participants