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

Hide re-exported traits from docs.rs #276

Closed
JelteF opened this issue Jul 24, 2023 · 2 comments · Fixed by #280
Closed

Hide re-exported traits from docs.rs #276

JelteF opened this issue Jul 24, 2023 · 2 comments · Fixed by #280
Assignees
Milestone

Comments

@JelteF
Copy link
Owner

JelteF commented Jul 24, 2023

Somehow docs.rs is displaying all re-exported traits anyway. Eventhough they are marked as #[docs(hidden)]. We should figure out why and fix that. cargo doc --features full doesn't display them for me. So I'm not sure what's going on here.

Link to docs.rs: https://docs.rs/derive_more/1.0.0-beta.2/derive_more/index.html#traits

@ModProg
Copy link
Contributor

ModProg commented Jul 25, 2023

We could have a docs feature that disables them.

@tyranron tyranron added this to the 1.0.0 milestone Jul 26, 2023
@tyranron
Copy link
Collaborator

tyranron commented Jul 26, 2023

@JelteF

So I'm not sure what's going on here.

Fortunately, we have the build log: https://docs.rs/crate/derive_more/1.0.0-beta.2/builds/868921

As we see, docs.rs uses cargo rustdoc command instead of cargo doc.

cargo doc --features full doesn't display them for me.

For me neither. However, cargo rustdoc -p derive_more --features full --open reproduces the issue perfectly.

@tyranron tyranron self-assigned this Jul 26, 2023
tyranron added a commit that referenced this issue Jul 26, 2023
- Do not import traits when building on `docs.rs` (fixes #276).
- Use `macro@` prefix for README intra-doc links to disambiguate them
with traits (fixes #278).

The result can be checked by running the command reproducing `docs.rs`
build nearly:
```bash
RUSTDOCFLAGS='--cfg docsrs' cargo rustdoc -p derive_more --features full --open
```

Additionally:
- fix crate version in README

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants