Skip to content

Clarify docs for new --features CLI? #9305

@matklad

Description

@matklad

Hey, I am reading the docs at https://doc.rust-lang.org/nightly/cargo/reference/features.html#command-line-feature-options, and I am feeling confused about two things. The docs say

the package-name/feature-name syntax can be used to specify features for specific workspace members.

But then, in the next section, the example uses dashes rather that /:

cargo build -p foo -p bar --features foo-feat,bar-feat

Additionally, I've noticed that, in the workspace root with a virtual manifest, the name of the package can be omited and --features f activates f for all packages in the workspace that have the said feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions