4

Rustdoc: Do not list impl when trait has doc(hidden) by fee1-dead · Pull Request...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/86513
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Contributor

danielhenrymantilla commented 9 days ago

edited

Nice, I like the manually laid out stack to avoid recursing slightly_smiling_face A few comments:

  • I've seen you're "only" checking for the type parameters of a #[doc(hidden)] trait, so the following questions remain open:

    • What happens if the cross-crate #[doc(hidden)] type is the "receiver" / Self of the impl Trait…?

      • Playground

      • Given your algorithm, I guess a very simple solution would be to add the Self type to that stack of yours +1

    • What happens if the trait itself is the cross-crate #[doc(hidden)] one?

      EDIT: Sorry, I had missed the fact that a cleaned trait becomes a Type, under rustdoc, so I suspect your PR already handles this case.

Could you try handling those the former case as well, together with unit tests for both cases? Thanks


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK