Just throwing ideas here.
Macros has to be invoked at declaration. What I mean by this is the following:
#[Derive(PrintSignature)]
struct Whatever;
the PrintSignature macro has to be declared with this struct.
But this is often not the ideal way to do things. For something like printing the signature of a struct we shouldn't have to implement a whole new trait for it. What I'm thinking is that we could do is make the macros callable anywhere. We could "portal" the tokens from its declaration site to the macro. For instance:
struct Whatever;
fn main() {
Whatever#print_signature!() // example syntax
}
print_signature! would still receive the tokens struct Whatever, but it just doesn't have to be where the declaration is . There's another advantage which is that this can be applied things of other crates as well, which circumvents the orphan rule because we no longer need to implement traits.
Another example: I have a macro which turns a struct into a struct-of-arrays. Basically it creates a new struct but with each field wrapped in a Vec, and adds some convenience functions. Having tokens "teleported" means that I can use this macro for structs from libraries like a vec3d struct or color.