Closed Nemo157 closed 5 years ago
Still broken, looks like. Seems we'll need to properly document proc-macros, and handle their re-export, now.
Something that strikes me as odd is that the original crate shows the proc-macro as a function, and it's only when it's re-exported is it seen as a macro:
I think we'll need to handle the #[proc_macro_attribute]
(and other proc-macro declaration attributes) when displaying these items. Then we'll need to see what happens when we get these as re-exports. I'm not too surprised that it still appears as a re-export, but i am curious what is causing it to mess up the link like that.
Update: It looks like the odd curly-brace segment of the link is gone, but the links are still broken because rustdoc is still treating proc-macros as functions in their source crate. Not sure what fixed that, but it means one less thing to figure out when fixing this for real.
I've opened https://github.com/rust-lang/rust/pull/54577 to make rustdoc properly document proc-macros, but there's a wrinkle that means their re-export is still a little awkward (though it's better than before). I wrote more about it in that PR.
If you define a proc-macro in one crate, then re-export it from another crate via the
use_extern_macros
feature the resulting documentation does not link to the macro correctly, and the tooltip has some weird details displayed in it:link:
../proc_macro_re_export_proc_macro/macro.%7B%7BGlobalMetaData::Krate%7D%7D.html