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

Section on proc macros is out of date #856

Closed
camelid opened this issue Jul 28, 2020 · 2 comments
Closed

Section on proc macros is out of date #856

camelid opened this issue Jul 28, 2020 · 2 comments

Comments

@camelid
Copy link
Member

camelid commented Jul 28, 2020

The section on function-like procedural macros says (emphasis mine):

Function-like procedural macros may expand to a type or any number of items, including macro_rules definitions. They may be invoked in a type expression, item position (except as a statement), including items in extern blocks, inherent and trait implementations, and trait definitions. They cannot be used in a statement, expression, or pattern.

However, as of Rust 1.45, function-like procedural macros can be used in statement, expression, and pattern positions. (It was introduced in rust-lang/rust#68717.)

Cc https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/docs.3A.20proc.20macro.20in.20expression

@camelid
Copy link
Member Author

camelid commented Jul 28, 2020

Actually, it looks like the source in this repository for that section is up-to-date. Has it not been deployed?

@camelid
Copy link
Member Author

camelid commented Jul 28, 2020

Didn't realize that the reference branches like the compiler :)

@camelid camelid closed this as completed Jul 28, 2020
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