Skip to content

quick fix only applies one half of the proposed fix from clippy, wont compile anymore after doing the quick fix #17163

Closed
@antonilol

Description

@antonilol

rust-analyzer version: rust-analyzer version: 0.4.1939-standalone

rustc version: rustc 1.77.0 (aedd173a2 2024-03-17)

editor or extension: code OSS (open core of vscode)

relevant settings: i use cargo clippy instead of cargo check, to get clippy suggestions in the editor, this is relevant for reproducing this

code snippet to reproduce:

fn main() {
    let a;
    let b = 0;
    a = b;
    let _ = a;
}

apply one of the the two parts from the suggested quick fix

this is not a clippy bug, auto-fixing it with clippy will apply both parts

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsdiagnostics / error reportingC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions