10000 Destructuring assignment is not parsed correctly · Issue #6598 · intellij-rust/intellij-rust · GitHub
[go: up one dir, main page]

Skip to content
Destructuring assignment is not parsed correctly #6598
@andll

Description

@andll

Destructuring assignment is an experimental feature in rust, however it is likely to be merged at some point.

Intelij rust plugin does not correctly parse the situation, highlighting an error on the syntactically correct code.

Environment

  • IntelliJ Rust plugin version: 0.3.138.3572-203
  • Rust toolchain version: 1.51.0-nightly (257becbfe 2020-12-27) aarch64-apple-darwin
  • IDE name and version: IntelliJ IDEA 2020.3.1 Community Edition (IC-203.6682.168)
  • Operating system: macOS 11.1
  • Macro expansion engine: new
  • Name resolution engine: old

Problem description

Steps to reproduce

#![feature(destructuring_assignment)]

fn demo() {
    let mut x = 0;
    let y;
    (x, y) = (0, 0);  // Rust plugin highlights y as an error('Use of possibly uninitialized variable')
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurerustIssues about new language features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0