Skip to content

[feat] Should support quickfix adding missing feature #15798

Open
@loynoir

Description

@loynoir

Problem

Currently, fix missing feature does not support quick fix.

failed to resolve: could not find `X` in `Y` the item is gated behind the `Z` feature
error[E0433]: failed to resolve: could not find `X` in `Y`
...
note: found an item that was configured out
    = note: the item is gated behind the `Z` feature
No quick fixes available

Currently

Need 5 human steps to fix

  1. Click for full compiler diagnostic

  2. Copy feature name Z, remember depedency name Y

  3. Find Cargo.toml

  4. Open Cargo.toml, locate Cargo.toml dependencies field Y

  5. Alter Y = "1.2.3" to Y = { version = "1.2.3", features = ["Z"] }

Feat

Should support quickfix adding missing feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargocargo related issuesC-featureCategory: feature requestE-hard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions