Skip to content

Improve cargo add -F crate/invalid_feat error discovery #11100

@Emilgardis

Description

@Emilgardis

Problem

When using cargo add -F crate/feat, if the feat feature does not exist, the error is not presented until the end.

image

This can be easy to miss, as most cargo warnings are presented with more context/text around them. cargo add however spits out a features table as if everything is ok and then presents an error.

Proposed Solution

Attach more context in the output to clearly signal that "hey, this is not correct, check the error message"

image

Notes

this has been implemented in #11098, creating this per request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-addS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions