slint-ui / document-features

Extract documentation for the feature flags from comments in Cargo.toml
Apache License 2.0
174 stars 13 forks source link

Shows `document-features` as a crate in the Rustdoc #3

Closed BartMassey closed 2 years ago

BartMassey commented 2 years ago

This crate seems to insert itself into the documentation it generates. (See the lower-left corner where it appears.)

document-features-crate

Any way to suppress that?

tronical commented 2 years ago

I think if you run cargo doc with just -p rbj_eq it might work :)

Kijewski commented 2 years ago

The "crates" section won't be rendered on docs.rs, see e.g. https://docs.rs/nate/0.1.10/nate/

ogoffart commented 2 years ago

I believe rustdoc should be called with the --no-deps option

cargo doc --no-deps
BartMassey commented 2 years ago

Thanks much for the time and suggestions! I'd like to be able to have full Rustdoc on my github for the crates my app actually uses, without documenting this crate which is really a doc-only dependency, though. For now I'll just continue to document features manually, I guess.

ogoffart commented 2 years ago

Did you try

cargo doc --no-deps

It really shouldn't produce docs for dependencies

BartMassey commented 2 years ago

cargo doc --no-deps doesn't produce docs for any dependencies, yes. I want docs for my "real" dependencies, so that the docs can be standalone on Github. (I republish some items from my dependencies.)

ogoffart commented 2 years ago

The thing is that this is also a real dependency.

So I don't know if there are flags in rustdoc to select what dependencies to show. Maybe you can inject JavaScript to hide it with --html-in-header or something.