You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, my library has a proc macro that generates code that uses #[derive(::my_library::RefCast)].
Here ::my_library::RefCast reexports ::ref_cast::RefCast, but sadly the RefCast macro generates hardcoded references to the ::ref_cast crate.
This means that users of my_library have to add a dependency on both my-library and ref-cast.
Could you make the RefCast derive macro accept a path to the location where it has been reexported from and then use that for the generated code?
The text was updated successfully, but these errors were encountered:
I would prefer not to support that in this crate. But if you are interested in working on it, rust-lang/rust#54363 (comment) describes a design for how I would like for proc macro re-exporting to work instead.
Hi, my library has a proc macro that generates code that uses
#[derive(::my_library::RefCast)]
.Here
::my_library::RefCast
reexports::ref_cast::RefCast
, but sadly the RefCast macro generates hardcoded references to the::ref_cast
crate.This means that users of
my_library
have to add a dependency on bothmy-library
andref-cast
.Could you make the
RefCast
derive macro accept a path to the location where it has been reexported from and then use that for the generated code?The text was updated successfully, but these errors were encountered: