Skip to content

use $crate in macro - #270

Merged
josephlr merged 1 commit into
rust-random:masterfrom
leoyvens:macro-crate-reference
Jul 8, 2022
Merged

use $crate in macro#270
josephlr merged 1 commit into
rust-random:masterfrom
leoyvens:macro-crate-reference

Conversation

@leoyvens

@leoyvens leoyvens commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

This is the recommended way of referring to the current crate in a macro.

@josephlr josephlr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per https://doc.rust-lang.org/reference/macros-by-example.html#hygiene $crate was added in 1.30 and our MSRV is 1.34, so LGTM.

@josephlr
josephlr merged commit 3d818a6 into rust-random:master Jul 8, 2022
takumi-earth pushed a commit to earthlings-dev/getrandom that referenced this pull request Jan 27, 2026
This is the recommended way of referring to the current crate in a macro.
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