Open ranfdev opened 2 years ago
I second this one, would be quite useful, and seems more like an oversight than inherent implementation difficulty (since #[doc = stringify!(...)]
is already supported).
@rustbot label +T-rustdoc
I remember a discussion we had about this with @petrochenkov where they mentioned that we voluntarily limited macro expansions to "top level" attribute items. So doc = stringify!()
works, but doc(alias = stringify!())
doesn't.
When working with ffi, sometimes I need to alias the rust function to the foreign one.
Since I need to wrap many foreign functions, I use a macro (created with macro_rules) which looks roughly like this:
stringify!
,concat!
and other similar macros are really useful to generate the alias. It would be nice being able to use them