Proc-macro referencing self module

extern crate self as Path would be a more "global" workaround than doing use crate as Path at each namespace.

Your XY problem, I think is that you want to test your proc-macro crate within the frontend crate that exports the item(s). And in order to perform those tests, extern crate self as public_name; is indeed the usual workaround.

1 Like