You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using tuple destructuring assignment without a let, i.e., when assigning to existing variables and not binding new variables, RA incorrectly flags it as a syntax error. The code below actually compiles fine.
let x;let y;(x, _, y, _) = (1,2,3,4);// <-- half of this line is flagged with various "expected X" errors// not flaggedlet(x, _, y, _) = (1,2,3,4);
The text was updated successfully, but these errors were encountered:
I think we don't support destructuring assignment at all yet, so this gets parsed as a binary expression with the LHS being parsed as an expression as well.
(I believe there is an issue about that already but I can't find it).
rust-analyzer version:
ba3305480 2022-02-07 stable
rustc version:
rustc 1.60.0-nightly (08df8b81d 2022-01-30)
When using tuple destructuring assignment without a
let
, i.e., when assigning to existing variables and not binding new variables, RA incorrectly flags it as a syntax error. The code below actually compiles fine.The text was updated successfully, but these errors were encountered: