Skip to content

Add "make mutable" diagnostic / quick fix for local variables #8449

Closed
@jplatte

Description

@jplatte

Example:

let foo = Vec::new();

loop {
    // other code
    foo.<|>
}

To reproduce:

  • Type pu => get Vec::push suggested
  • Accept suggestion => line changes to foo.push(value)

Desired outcome: let foo = Vec::new(); is changed to let mut foo = Vec::new(); when accepting the suggestion
Actual outcome: let foo = Vec::new(); is not changed

I would love if ra did this because that would require less jumping around the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsdiagnostics / error reportingS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions