Stream: rustdoc

Topic: Issues about transitive #[doc(inline)] s


view this post on Zulip Charles Lew (Dec 15 2020 at 08:51):

Currently std doc displays one Re-export item: std::arch. The definition is actually reexported from core::arch, which is exported from stdsimd::arch. There's a #[doc(no_inline)] attribute on this re-export because there were problems if such an attribute not added.

I'm a little curious whether this small issue is easy to solve...

view this post on Zulip Joshua Nelson (Dec 15 2020 at 12:45):

What were the problems?

view this post on Zulip Charles Lew (Dec 17 2020 at 11:51):

https://github.com/rust-lang/rust/issues/61038#issuecomment-494790522
https://github.com/rust-lang/rust/pull/57808#issuecomment-457390549

Seems related to compiled crate not containing other arch information, but i'm not very sure...

view this post on Zulip Joshua Nelson (Dec 17 2020 at 13:29):

@Charles Lew if by "solve" you mean "generate docs for each platform and combine them separately", then no, this is not easy: https://github.com/rust-lang/rust/issues/1998

view this post on Zulip Joshua Nelson (Dec 17 2020 at 13:31):

More info about this in https://github.com/rust-lang/rust/pull/43348 and https://github.com/rust-lang/rust/pull/73566

view this post on Zulip Joshua Nelson (Dec 17 2020 at 13:32):

(I'm not happy the standard library does this either)

view this post on Zulip Joshua Nelson (Dec 17 2020 at 13:32):

(deleted)

view this post on Zulip Charles Lew (Dec 17 2020 at 13:33):

Thanks, but if the goal is find a workaround to display module docs for std::arch at the crate root page, is there an easier solution?

view this post on Zulip Joshua Nelson (Dec 17 2020 at 13:33):

I don't know, you'd have to talk to @gnzlbg

view this post on Zulip Charles Lew (Dec 17 2020 at 13:34):

ok... thanks!

view this post on Zulip Joshua Nelson (Dec 17 2020 at 16:17):

FWIW I think a short-term fix might be to redirect std/arch/ to core/arch/ somehow

view this post on Zulip Joshua Nelson (Dec 17 2020 at 16:17):

but the larger issue is much harder to fix

view this post on Zulip Charles Lew (Dec 18 2020 at 10:27):

Does rustdoc have a special attribute supporting such a redirection? (I suppose no.)
Will it accept such a nightly attribute to only be used on std crate?

view this post on Zulip Joshua Nelson (Dec 18 2020 at 14:03):

honestly if you're going to special-case bootstrap I would prefer to just write the HTML file yourself in bootstrap

view this post on Zulip Joshua Nelson (Dec 18 2020 at 14:03):

rustdoc has very predictable patterns for the file layout


Last updated: Oct 11 2021 at 22:34 UTC