Skip to content

Remove manual --cfg docsrs in Cargo.toml metadata #14132

Closed
@BD103

Description

@BD103

What problem does this solve or what need does it fill?

At the bottom of every public crate is the following:

[package.metadata.docs.rs]
rustdoc-args = ["-Zunstable-options", "--cfg", "docsrs"]
all-features = true

This allows code to check that it is building on docs.rs using #[cfg(docsrs)]. It's frequently used for nightly docs annotations, such as enabling auto-feature-documentation. The --cfg docsrs section of rustdoc-args can be removed, since it is now passed to all crates instead of just the main one being built.

What solution would you like?

Remove --cfg docsrs from the Cargo.toml, and re-evaluate if -Zunstable-options is still necessary.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Build-SystemRelated to build systems or continuous integrationC-DocsAn addition or correction to our documentationC-FeatureA new feature, making something new possibleD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions