Skip to content

False positive "cannot mutate immutable variable (E0384)" error #16421

@chvllad

Description

@chvllad

rust-analyzer version: 0.4.1816-standalone (d410d4a 2024-01-21)

rustc version: 1.77.0-nightly (d5fd099 2024-01-22)

Code https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=143f7fbac71c9d440720ae04f8c9018c gives error cannot mutate immutable variable f at the line 21, but compiles fine in rustc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tytype system / type inference / traits / method resolutionC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions