bkchr / proc-macro-crate

`$crate` in procedural macros.
Apache License 2.0
65 stars 17 forks source link

Support usage from the crate being referenced #6

Closed courajs closed 4 years ago

courajs commented 4 years ago

From within the crate itself, its own name isn't defined. Instead, its top-level namespace is referenced via crate::.

This allows you to use a derive macro within the crate that defines the trait being derived.