# pre-RFC: List all re-exported items, including those imported by wildcards, in rust docs

**URL:** <https://internals.rust-lang.org/t/pre-rfc-list-all-re-exported-items-including-those-imported-by-wildcards-in-rust-docs/19839>\
**Category:** documentation\
**Created:** [November 8, 2023, 8:02pm UTC](https://internals.rust-lang.org/t/pre-rfc-list-all-re-exported-items-including-those-imported-by-wildcards-in-rust-docs/19839 "2023-11-08T20:02:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam0x17](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/sam0x17/32/11490_2.png) [@sam0x17](https://internals.rust-lang.org/u/sam0x17)\
**Post date:** [November 8, 2023, 8:02pm UTC](https://internals.rust-lang.org/t/pre-rfc-list-all-re-exported-items-including-those-imported-by-wildcards-in-rust-docs/19839/1 "2023-11-08T20:02:03Z")

</div>

Originally contemplated here: [feature request: collapsable tree view for items included via pub re-exports · Issue #2310 · rust-lang/docs.rs · GitHub](https://github.com/rust-lang/docs.rs/issues/2310)

Right now many crates will do large public re-exports of a prelude or something that possibly includes many other public re-exports, where it is rather difficult to figure out what is actually included in that export without directly querying the language server. The most difficult cases are scenarios like this:

```rust
pub use some_module::prelude::*;

```

But then you go to visit the `prelude` module, and you find that it in turn has a bunch of glob re-exports, so it becomes very difficult (without talking to the language server) to know what items are actually included.

Rust docs could make this a lot easier if there were a collapsible tree view listing all re-exported items in the current module, instead of just listing the re-export statements like it does now. For items that are specifically re-exported, this is currently fine, but for wildcard re-exports, it is impossible to know without visiting the other module what items are actually coming in, and this is of course exacerbated when we have glob re-exports of glob re-exports of glob re-exports...

For example there could be "Re-Exported Structs:", "Re-Exported Modules:", "Re-Exported Traits", etc.

I think something like this would dramatically improve the dev UX of rust docs for a wide swathe of the crate ecosystem.

---

<div class="post-metadata">

**Author:** ![pitaj](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/pitaj/32/11262_2.png) [@pitaj](https://internals.rust-lang.org/u/pitaj)\
**Post date:** [November 8, 2023, 9:10pm UTC](https://internals.rust-lang.org/t/pre-rfc-list-all-re-exported-items-including-those-imported-by-wildcards-in-rust-docs/19839/2 "2023-11-08T21:10:59Z")

</div>

I like the idea. Does `#[doc(inline)]` do anything on glob imports at the moment? If not, it could be used for that.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [February 6, 2024, 9:11pm UTC](https://internals.rust-lang.org/t/pre-rfc-list-all-re-exported-items-including-those-imported-by-wildcards-in-rust-docs/19839/3 "2024-02-06T21:11:42Z")

</div>

Closed on February 6, 2024, 9:11pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
