Skip to content

refactor: simplify docsrs cfg#105

Merged
rklaehn merged 1 commit into
mainfrom
Frando/docsrs-cfg
Jul 1, 2026
Merged

refactor: simplify docsrs cfg#105
rklaehn merged 1 commit into
mainfrom
Frando/docsrs-cfg

Conversation

@Frando

@Frando Frando commented Jun 16, 2026

Copy link
Copy Markdown
Member

Cleans up the feature-gate doc machinery left over from the quic-rpc origins.

  • Drop the per-item doc(cfg(...)) annotations. Rustdoc now infers feature badges from the real #[cfg(...)] gates automatically. doc_auto_cfg was merged into doc_cfg in Rust 1.92 (rust-lang/rust#138907), so it is the default when feature(doc_cfg) is on. feature(doc_cfg) is nightly-only, but it is gated behind the irpc_docsrs cfg that only docs.rs sets. Regular builds never see it, so our MSRV stays at 1.91 on stable.
  • Rename quicrpc_docsrs to irpc_docsrs, matching the crate name and the iroh_docsrs convention.

We keep a crate-specific cfg rather than the common docsrs because --cfg docsrs leaks into dependencies. A full doc build fails when cordyceps enables now-removed features behind #[cfg(docsrs)]. Using irpc_docsrs sidesteps that.

@Frando Frando requested a review from rklaehn June 16, 2026 12:48
@rklaehn rklaehn merged commit b6f8c46 into main Jul 1, 2026
17 checks passed
@rklaehn rklaehn deleted the Frando/docsrs-cfg branch July 1, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants