Skip to content

Dependency fails with "the feature doc_cfg has already been declared" #1289

@pka

Description

@pka

Crate name: geozero
Build failure link: https://docs.rs/crate/geozero/0.7.2/builds/355163

Additional details:
geozero has the following Cargo.toml entry:

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

cfg(docsrs) is required for a doc.rs build of the dependency gdal: https://github.com/georust/gdal/blob/master/build.rs#L3

The failing tokio-stream crate does in fact set a feature twice based on docsrs: https://github.com/tokio-rs/tokio/blob/master/tokio-stream/src/lib.rs#L17-L23

But a local doc build is successful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions