-
Notifications
You must be signed in to change notification settings - Fork 307
Procedural Macros in Rust 2018 #348
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
cc @dtolnay, you're likely to have thoughts on this! |
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
We can then write some unit tests in `tests/smoke.rs`: | ||
|
||
```rust | ||
#[my_crate::hello] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oooh interesting! So most of our examples so far have had you use
hello and then #[hello]
. i wonder which style we should encourage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't particularly have a preference either way, but I figured this was a good opportunity to show this off at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Co-Authored-By: alexcrichton <alex@alexcrichton.com>
Updated with your feedback as well @nrc, thanks! |
This is the next post lined up after this week's Rust tools in 2018, and I think we'll ideally shoot for publication this Friday if possible!
Rendered