kornelski / rust-rgb

struct RGB for sharing pixels between crates
https://lib.rs/rgb
MIT License
98 stars 19 forks source link

Allow `docs.rs` to auto-label optional features. #68

Closed ripytide closed 2 months ago

ripytide commented 3 months ago

See rustdoc documentation on it at https://doc.rust-lang.org/rustdoc/unstable-features.html#doc_auto_cfg-automatically-generate-doccfg

This should fix #34

kornelski commented 3 months ago

This seems to be poorly implemented — the labels are more verbose and contain cfg syntax. doc(cfg) produces nicer output.

ripytide commented 3 months ago

I'm confused by what you mean by verbose?

This is what I see using #![feature(doc_auto_cfg)] for the GRB page: image Vs without: image

kornelski commented 3 months ago

Examples in the linked rustdoc issue looked worse and printed raw cfg expressions. Maybe it's been fixed since?

ripytide commented 3 months ago

Oh I see the issue in https://github.com/rust-lang/rust/issues/43781, yeah the example given there does look quite verbose but I think they've mostly fixed it by now.

Here is the listing page which I think is very manageable: image