Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustdoc does not show reexported members when using #[doc(inline)] on other crate #58693

Closed
TimDiekmann opened this issue Feb 24, 2019 · 1 comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@TimDiekmann
Copy link
Member

TimDiekmann commented Feb 24, 2019

Expected behavior:

Both, module and trait, are shown:

image


Observed behavior:

Only module is shown:

image


Reproduction:

# Create project
cargo new rustdoc-test 
cd rustdoc-test

# Create inner crate
cargo new rustdoc-test-inner --lib  

# Add inner crate as dependency and to workspace
echo -e "rustdoc-test-inner = { path = \"rustdoc-test-inner\" }\n\n[workspace]\nmembers = [\"rustdoc-test-inner\"]" >> Cargo.toml 

# Reexport inner crate with `#[doc(inline)]`
echo -e "#[doc(inline)]\npub use rustdoc_test_inner;" >> src/main.rs

# Define a trait and reexport it in `prelude`
echo -e "pub mod prelude {\n    pub use super::FooTrait;\n}\n\npub trait FooTrait {}" > rustdoc-test-inner/src/lib.rs
cargo doc --open

Notes

  • Tested on latest nightly and stable
  • Without #[doc(inline)] it's shown, however it's reexported as crate and is not compatible with cargo doc --no-deps

CC #24305

@TimDiekmann TimDiekmann changed the title Rustdoc does not show reexported members when using #[doc(inline)] on workspace crate Rustdoc does not show reexported members when using #[doc(inline)] on other crate Feb 24, 2019
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 24, 2019
@fmease
Copy link
Member

fmease commented Aug 30, 2024

Now works as expected, closing.

(Reproduction steps were slightly outdated (need to move [workspace] decl above [dependencies]) & omitted some details (creation of inner package rustdoc-test-inner)).

@fmease fmease closed this as completed Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants