0

When generating rustdoc with --document-private-items for my binary, it creates tons of unintended noise such as can be seen in the images below.

It seems that these are generated by slog::info macro (docs.rs/slog/latest/slog/macro.info.html).

Any idea how to get rid of that?

opaque types generated by ??? LOC train generated by slog macros

Samuel Hapak
  • 6,950
  • 3
  • 35
  • 58
  • Can you share your source? It's probably from macros. – drewtato Mar 22 '23 at 18:01
  • The LOC is from `slog::info` macro (https://docs.rs/slog/latest/slog/macro.info.html) I guess the opaque type would have a similar source. Any idea how to get rid of them? – Samuel Hapak Mar 22 '23 at 18:10
  • You can add `#[doc(hidden)]` but that's only going to work if `LOC` is the first item in the macro. If that doesn't work, you might be able to put the whole thing in a module and hide the entire module. – drewtato Mar 22 '23 at 18:34
  • @drewtato so, you suggest to put the macro in the module, hide the module, and import the macro from it? – Samuel Hapak Mar 22 '23 at 19:20
  • No, call the macro in a module and `pub use` what you need from it. Looking at the macro now, though, that would probably be inconvenient. Probably better to either rewrite the macro or make everything else `pub`. – drewtato Mar 22 '23 at 19:31

0 Answers0